|
|
|
@ -20,7 +20,7 @@ CREATE TABLE `users` (
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `bank_cards` (
|
|
|
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
@ -47,4 +47,93 @@ CREATE TABLE `bank_cards` (
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `orders` (
|
|
|
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
|
`app_id` varchar(16) NOT NULL COMMENT '应用ID',
|
|
|
|
|
`member_id` varchar(32) NOT NULL,
|
|
|
|
|
`user_id` varchar(32) NOT NULL,
|
|
|
|
|
`order_no` varchar(32) NOT NULL,
|
|
|
|
|
`out_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`amount` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`pay_type` varchar(10) NOT NULL,
|
|
|
|
|
`agreement_no` varchar(32) NOT NULL DEFAULT '',
|
|
|
|
|
`expired_at` datetime DEFAULT NULL,
|
|
|
|
|
`notify_url` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`return_url` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`status` varchar(16) NOT NULL DEFAULT '',
|
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `order_split_infos` (
|
|
|
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
|
`app_id` varchar(16) NOT NULL COMMENT '应用ID',
|
|
|
|
|
`member_id` varchar(32) NOT NULL,
|
|
|
|
|
`user_id` varchar(32) NOT NULL,
|
|
|
|
|
`split_member_id` varchar(32) NOT NULL,
|
|
|
|
|
`split_user_id` varchar(32) NOT NULL,
|
|
|
|
|
`order_no` varchar(32) NOT NULL,
|
|
|
|
|
`out_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`sub_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`sub_out_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`split_amount` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`contract_no` varchar(32) NOT NULL,
|
|
|
|
|
`seller_flag` tinyint(1) NOT null DEFAULT 0,
|
|
|
|
|
`status` varchar(16) NOT NULL DEFAULT '',
|
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `refunds` (
|
|
|
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
|
`app_id` varchar(16) NOT NULL COMMENT '应用ID',
|
|
|
|
|
`member_id` varchar(32) NOT NULL,
|
|
|
|
|
`user_id` varchar(32) NOT NULL,
|
|
|
|
|
`order_no` varchar(32) NOT NULL,
|
|
|
|
|
`out_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`refund_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`refund_out_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`refund_amount` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`refund_reason` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`refund_type` varchar(16) NOT NULL DEFAULT '',
|
|
|
|
|
`remark` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`notify_url` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`status` varchar(16) NOT NULL DEFAULT '',
|
|
|
|
|
`finished_at` datetime DEFAULT NULL,
|
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `refund_split_infos` (
|
|
|
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
|
`app_id` varchar(16) NOT NULL COMMENT '应用ID',
|
|
|
|
|
`member_id` varchar(32) NOT NULL,
|
|
|
|
|
`user_id` varchar(32) NOT NULL,
|
|
|
|
|
`split_member_id` varchar(32) NOT NULL,
|
|
|
|
|
`split_user_id` varchar(32) NOT NULL,
|
|
|
|
|
`order_no` varchar(32) NOT NULL,
|
|
|
|
|
`out_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`sub_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`sub_out_order_no` varchar(32) NOT NULL,
|
|
|
|
|
`refund_amount` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|