-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdb
More file actions
56 lines (48 loc) · 2.09 KB
/
db
File metadata and controls
56 lines (48 loc) · 2.09 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
51
52
53
54
55
56
CREATE TABLE `account_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) DEFAULT NULL,
`money` int(11) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE `storage_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`commodity_code` varchar(255) DEFAULT NULL,
`count` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `commodity_code` (`commodity_code`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `order_tbl`;
CREATE TABLE `order_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` varchar(255) DEFAULT NULL COMMENT '用户id',
`commodity_code` varchar(255) DEFAULT NULL COMMENT '商品id',
`count` int(11) DEFAULT '0' COMMENT '商品数量',
`money` int(11) DEFAULT '0' COMMENT '金额',
`wms_status` varchar(1) DEFAULT NULL COMMENT '订单状态:0:待发货 1:已发货',
`order_no` varchar(36) DEFAULT NULL COMMENT '订单号',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=192 DEFAULT CHARSET=utf8;
CREATE TABLE `undo_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`branch_id` bigint(20) NOT NULL,
`xid` varchar(100) NOT NULL,
`context` varchar(128) NOT NULL,
`rollback_info` longblob NOT NULL,
`log_status` int(11) NOT NULL,
`log_created` datetime NOT NULL,
`log_modified` datetime NOT NULL,
`ext` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `wms_tbl`;
CREATE TABLE `wms_tbl` (
`wms_id` int(11) NOT NULL AUTO_INCREMENT,
`order_no` varchar(36) NOT NULL COMMENT '订单号',
`address` varchar(1000) NOT NULL COMMENT '发货地址',
`wms_status` varchar(1) NOT NULL COMMENT '订单状态:0:待发货 1:已发货',
`create_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '物流创建时间',
`update_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '物流更新是',
PRIMARY KEY (`wms_id`),
UNIQUE KEY `uni_key_index` (`order_no`)
) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8;