Commit e98303d37bd610b5ef6bca67ae59201f3ef9ed2d
1 parent
2280a477
update:补充sql
Showing
1 changed file
with
26 additions
and
0 deletions
scripts/upgrade/v1.0.28/etrade_order_1.0.28.20241016.sql
0 → 100644
1 | +ALTER TABLE `dili_xtrade`.`order` | ||
2 | +ADD COLUMN `total_refund_amount` bigint NULL DEFAULT 0 COMMENT '总退款金额'; | ||
3 | + | ||
4 | +use dili_xtrade; | ||
5 | +CREATE TABLE `order_refund` ( | ||
6 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', | ||
7 | + `refund_id` varchar(60) DEFAULT NULL COMMENT '退款单号', | ||
8 | + `order_id` bigint NOT NULL COMMENT '交易订单自增id', | ||
9 | + `order_code` varchar(60) NOT NULL COMMENT '交易订单编号', | ||
10 | + `market_id` bigint NOT NULL COMMENT '市场id', | ||
11 | + `refund_amount` bigint NOT NULL COMMENT '退款金额(分)', | ||
12 | + `refund_message` varchar(120) DEFAULT NULL COMMENT '退款说明', | ||
13 | + `state` tinyint NOT NULL COMMENT '退款状态', | ||
14 | + `notic` varchar(100) DEFAULT NULL COMMENT '退款失败说明', | ||
15 | + `trade_id` varchar(40) DEFAULT NULL COMMENT '支付单号', | ||
16 | + `order_payment_id` bigint DEFAULT NULL COMMENT '订单支付单主键', | ||
17 | + `version` int DEFAULT NULL, | ||
18 | + `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
19 | + `modified_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | ||
20 | + `refund_time` datetime DEFAULT NULL COMMENT '退款完成时间', | ||
21 | + `create_id` bigint DEFAULT NULL COMMENT '发起退款人id', | ||
22 | + `create_name` varchar(60) DEFAULT NULL COMMENT '发起退款人名称', | ||
23 | + PRIMARY KEY (`id`) USING BTREE, | ||
24 | + KEY `orderId` (`order_id`,`market_id`) USING BTREE, | ||
25 | + KEY `refundId` (`refund_id`) | ||
26 | +) ENGINE=InnoDB COMMENT='电子交易订单-结算单'; | ||
0 | \ No newline at end of file | 27 | \ No newline at end of file |