sell 项目 商品表 设计 及 创建

时间:2023-03-10 02:27:20
sell 项目  商品表 设计 及 创建

1.数据库表之间的关系说明

sell 项目  商品表 设计 及 创建

2.数据库设计

sell 项目  商品表 设计 及 创建

3.创建 商品表

/**
* 商品表
*/
create table `product_info` (
`product_id` varchar(32) not null,
`product_name` varchar(64) not null comment '商品名称',
`product_price` decimal(8,2) not null comment '单价',
`product_stock` int not null comment '库存',
`product_description` varchar(64) comment '描述',
`product_icon` varchar(512) comment '小图',
`category_type` int not null comment '类目编号',
`create_time` timestamp not null default current_timestamp comment '创建时间',
`update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
primary key (`product_id`)
) comment '商品表';

.