SpringBoot微信点餐系统学习笔记(一)
2018-12-12 本文已影响0人
转一圈_
数据库设计
首先在pom.xml
文件中引入依赖:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector- java</artifactId>
<version>8.0.13</version>
</dependency>
数据库分为如下4个表:
- 商品类目表
product_category
- 商品详情表
product_info
- 订单详情表
order_detail
- 订单主表
order_master
商品类目表

其中creat_time
和update_time
数据类型设置为TIMESTAMP
时间戳类型
create_time
设置默认值current_timestamp
在数据项创建时自动创建时间戳
update_time
设置默认值current_timestamp on update current_timestamp
在数据项创建和更新时自动创建和更新时间戳
商品详情表

订单详情表

订单主表
