business-sql.create_refund_table.sql Maven / Gradle / Ivy
CREATE TABLE matrix_business_refund
(
`id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`type_code` VARCHAR(255) NOT NULL COMMENT '类型编码',
`refund_id` VARCHAR(255) NOT NULL COMMENT '退款ID',
`pay_id` VARCHAR(255) NOT NULL COMMENT '支付ID',
`order_id` VARCHAR(255) NOT NULL COMMENT '订单号',
`refund_price` DECIMAL(20, 2) NOT NULL COMMENT '退款金额',
`order_by` INT(10) NOT NULL DEFAULT 0 COMMENT '排序字段',
`create_time` DATETIME NOT NULL COMMENT '创建时间',
`update_time` DATETIME NOT NULL COMMENT '更新时间',
`status` INT(1) NOT NULL DEFAULT 0 COMMENT '状态(0:退款中,1:已退款,2:退款失败,-1:删除)',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `refund_id` (`refund_id`) USING HASH
) DEFAULT CHARSET = utf8mb4 COMMENT '退款流水表'