订单退款.sql
1.7 KB
CREATE TABLE `im_order_refund` (
`refund_id` varchar(36) NOT NULL COMMENT '退款ID',
`refund_code` varchar(36) NOT NULL COMMENT '退款code',
`order_id` varchar(36) DEFAULT NULL COMMENT '订单ID',
`order_code` varchar(36) DEFAULT NULL COMMENT '订单号',
`member_id` varchar(36) DEFAULT NULL COMMENT '用户ID',
`refund_type` tinyint(4) DEFAULT '1' COMMENT '退款类型,1为退款,2为退货',
`refund_reason` varchar(512) DEFAULT NULL COMMENT '退款原因',
`refund_money` decimal(18,2) NOT NULL COMMENT '退款金额',
`order_money` decimal(18,2) NOT NULL COMMENT '订单金额',
`refund_remark` varchar(512) DEFAULT NULL COMMENT '退款备注',
`refund_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '退款状态',
`refund_procedure_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '退款流程状态',
`apply_date` datetime NOT NULL COMMENT '创建时间',
`refund_date` datetime DEFAULT NULL COMMENT '结束时间',
PRIMARY KEY (`refund_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='退款订单表';
CREATE TABLE `im_refund_procedure_record` (
`procedure_record_id` varchar(36) NOT NULL COMMENT '退款过程ID',
`refund_code` varchar(36) NOT NULL COMMENT '退款code',
`refund_id` varchar(36) DEFAULT NULL COMMENT '退款ID',
`operator_id` varchar(36) DEFAULT NULL COMMENT '操作员ID',
`operator_name` varchar(36) DEFAULT NULL COMMENT '操作员姓名',
`operator_date` datetime NOT NULL COMMENT '操作日期',
`operator_remark` varchar(512) DEFAULT NULL COMMENT '操作人员备注',
`operator_status` tinyint(4) DEFAULT '1' COMMENT '退款过程记录状态',
`operator_role` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`procedure_record_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='退款过程表';