ddl.sql
1.63 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
ALTER TABLE erp_product.product_price ADD coin_status TINYINT(3) UNSIGNED COMMENT '审批状态' DEFAULT 0;
ALTER TABLE erp_product.product_price ADD auditor_id INT(11) UNSIGNED COMMENT '审批人id';
ALTER TABLE erp_product.`product_price` MODIFY return_coin INT(11) UNSIGNED;
ALTER TABLE yh_shops.`product_price` MODIFY yoho_coin_num INT(11) UNSIGNED;
CREATE TABLE erp_product.yohocoin_audit(
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
biz_id INT(11) UNSIGNED COMMENT '业务id',
auditor_id INT(11) COMMENT '审批人id',
audit_date INT COMMENT '审批时间',
content VARCHAR(128) COMMENT '审批意见',
`coin_number` INT(11) UNSIGNED COMMENT '有货币数量',
operator_id INT(11) COMMENT '操作人id',
`status` TINYINT(3) UNSIGNED COMMENT '审批状态 1:待审核,2:通过,3:驳回',
PRIMARY KEY(id),
KEY `key_biz_id` (biz_id)
);
Alter table yh_orders.orders add column deliver_yoho_coin int(11) DEFAULT 0 comment '赠送有货币数';
CREATE TABLE yh_orders.orders_yoho_coin (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`order_code` bigint(20) unsigned NOT NULL DEFAULT '0',
`yoho_coin_num` int(11) DEFAULT 0 comment '赠送有货币数',
`status` tinyint(4) NOT NULL DEFAULT '0' comment '0 代表 需要赠送 1代表已赠送 2代表订单取消不赠送',
`create_time` int(10) unsigned NOT NULL DEFAULT '0',
`deliver_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '赠送时间',
`uid` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE `order_coin_code` (`order_code`),
KEY `order_coin_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;