cyywl_server/sql/pay_refund.sql

36 lines
2.6 KiB
Java
Raw Normal View History

DROP TABLE IF EXISTS `pay_refund`;
CREATE TABLE `pay_refund` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '退',
`req_no` varchar(64) NOT NULL COMMENT '退',
`merchant_id` bigint NOT NULL COMMENT '',
`app_id` bigint NOT NULL COMMENT '',
`channel_id` bigint NOT NULL COMMENT '',
`channel_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '',
`order_id` bigint NOT NULL COMMENT ' pay_order id',
`trade_no` varchar(64) NOT NULL COMMENT ' pay_extension no ',
`merchant_order_id` varchar(64) NOT NULL COMMENT '',
`merchant_refund_no` varchar(64) NOT NULL COMMENT '退',
`notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '',
`notify_status` tinyint NOT NULL COMMENT '退',
`status` tinyint NOT NULL COMMENT '退',
`type` tinyint NOT NULL COMMENT '退(退退)',
`pay_amount` bigint NOT NULL COMMENT ',',
`refund_amount` bigint NOT NULL COMMENT '退,',
`reason` VARCHAR(256) NOT NULL COMMENT '退',
`user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ' IP',
`channel_order_no` varchar(64) NOT NULL COMMENT 'pay_order channel_order_no ',
`channel_refund_no` varchar(64) DEFAULT NULL COMMENT '退',
`channel_error_code` varchar(128) DEFAULT NULL COMMENT '',
`channel_error_msg` varchar(256) DEFAULT NULL COMMENT '',
`channel_extras` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '',
`expire_time` datetime DEFAULT NULL COMMENT '退',
`success_time` datetime DEFAULT NULL COMMENT '退',
`notify_time` datetime DEFAULT NULL COMMENT '退',
`creator` varchar(64) DEFAULT '' COMMENT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
`updater` varchar(64) DEFAULT '' COMMENT '',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='退';