etrade_shop_1.0.12_kangtian.sql
2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CREATE TABLE `dili_etrade`.`shop_main_product`
(
`id` bigint NOT NULL AUTO_INCREMENT,
`shop_id` bigint NOT NULL COMMENT '店铺id',
`market_id` bigint NOT NULL COMMENT '市场id',
`category_id` bigint NOT NULL DEFAULT 0 COMMENT '品类id',
`category_name` varchar(50) NOT NULL COMMENT '品类名称',
`level` int NOT NULL DEFAULT '1' COMMENT '层级',
`top_category_id` bigint NOT NULL DEFAULT 0 COMMENT '一级品类id',
`top_category_name` varchar(50) NOT NULL COMMENT '一级品类名称',
`created_time` datetime NOT NULL DEFAULT current_timestamp COMMENT '创建时间',
`creater` varchar(50) DEFAULT NULL COMMENT '创建人名字',
`creater_id` bigint DEFAULT NULL COMMENT '创建人ID',
`modified_time` datetime NOT NULL DEFAULT current_timestamp on update current_timestamp COMMENT '更新时间',
`modifier` varchar(50) DEFAULT NULL COMMENT '修改人名字',
`modifier_id` bigint DEFAULT NULL COMMENT '修改人ID',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `unq_shop_category` (`shop_id`,`category_id`) USING BTREE COMMENT '同店铺同品类只能有一个'
) ENGINE=InnoDB AUTO_INCREMENT=1 COMMENT='店铺主营商品表';
CREATE TABLE `dili_etrade`.`shop_approve_main_product`
(
`id` bigint NOT NULL AUTO_INCREMENT,
`shop_id` bigint NOT NULL COMMENT '店铺id',
`approve_id` bigint NOT NULL COMMENT '店铺审核id',
`market_id` bigint NOT NULL COMMENT '市场id',
`category_id` bigint NOT NULL DEFAULT 0 COMMENT '品类id',
`category_name` varchar(50) NOT NULL COMMENT '品类名称',
`level` int NOT NULL DEFAULT '1' COMMENT '层级',
`top_category_id` bigint NOT NULL DEFAULT 0 COMMENT '一级品类id',
`top_category_name` varchar(50) NOT NULL COMMENT '一级品类名称',
`created_time` datetime NOT NULL DEFAULT current_timestamp COMMENT '创建时间',
`creater` varchar(50) DEFAULT NULL COMMENT '创建人名字',
`creater_id` bigint DEFAULT NULL COMMENT '创建人ID',
`modified_time` datetime NOT NULL DEFAULT current_timestamp on update current_timestamp COMMENT '更新时间',
`modifier` varchar(50) DEFAULT NULL COMMENT '修改人名字',
`modifier_id` bigint DEFAULT NULL COMMENT '修改人ID',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `unq_approve_category` (`approve_id`,`category_id`) USING BTREE COMMENT '同审核同品类只能有一个'
) ENGINE=InnoDB AUTO_INCREMENT=1 COMMENT='店铺审核主营商品表';
ALTER TABLE `dili_etrade`.`shop`
ADD COLUMN wx_merchant_number varchar(50) DEFAULT NULL COMMENT '微信商户号';
ALTER TABLE `dili_etrade`.`shop_approve`
ADD COLUMN wx_merchant_number varchar(50) DEFAULT NULL COMMENT '微信商户号';