diff --git a/document/sql/mall_structure.sql b/document/sql/mall_structure.sql index 9bab70f..1e32cd7 100644 --- a/document/sql/mall_structure.sql +++ b/document/sql/mall_structure.sql @@ -1204,28 +1204,47 @@ CREATE TABLE IF NOT EXISTS `oms_express_company` ( alter table ums_member change nickname nickname varchar(64) character set utf8mb4 collate utf8mb4_unicode_ci; -DROP TABLE IF EXISTS `ums_member_relation_tree`; -CREATE TABLE `ums_member_relation_tree` ( + + DROP TABLE IF EXISTS `ums_member_relation_tree`; + CREATE TABLE `ums_member_relation_tree` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id', `member_id` bigint(20) NULL DEFAULT 0 COMMENT '会员id', - `higher_level_id` int(11) NULL DEFAULT 0 COMMENT '上级会员id', - `quit_queue_mark` int(11) NULL DEFAULT 0 COMMENT '0 未退出,1 退出队列', + `lower_level_id` bigint(20) NULL DEFAULT 0 COMMENT '下级会员id', + `higher_level_id` bigint(20) NULL DEFAULT 0 COMMENT '上级会员id', `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '会员关系树' ROW_FORMAT = DYNAMIC; + DROP TABLE IF EXISTS `ums_member_order_queue`; + CREATE TABLE `ums_member_order_queue` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `member_id` bigint(20) NULL DEFAULT 0 COMMENT '会员id', + `order_id` bigint(20) NULL DEFAULT 0 COMMENT '订单id', + `order_amount` decimal(10, 2) NULL DEFAULT 0 COMMENT '订单金额', + `queue_index` bigint(20) NULL DEFAULT 0 COMMENT '队列位置', + `quit_queue_mark` int(1) NULL DEFAULT 0 COMMENT '0 未退出,1 准备退队列, 2退出队列', + `queue_type` int(1) NULL DEFAULT 0 COMMENT '0 普通队列,1 加速队列', + `remain_number` int(1) NULL DEFAULT 5 COMMENT '加速单剩余数量', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '会员订单队列' ROW_FORMAT = DYNAMIC; + + DROP TABLE IF EXISTS `ums_member_account_transaction`; CREATE TABLE `ums_member_account_transaction` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id', `member_id` bigint(20) NULL DEFAULT 0 COMMENT '会员id', `order_id` bigint(20) NULL DEFAULT 0 COMMENT '订单id', `revenue_amount` decimal(10, 2) NULL DEFAULT 0 COMMENT '进帐金额', + `transaction_state` int(1) NULL DEFAULT 0 COMMENT '转账状态 0 未转账,1 转账, 2 退款', `remarks` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', `commission_ratio` int(10) NULL DEFAULT 0 COMMENT '提成比例', `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', + `transfer_payment_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '转账时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '会员账户流水' ROW_FORMAT = DYNAMIC; +