2
0

feat: 多套餐

This commit is contained in:
caiyuchao
2025-02-13 15:13:49 +08:00
parent d0c9eb320a
commit 3731aefec8
8 changed files with 284 additions and 17 deletions

View File

@@ -66,6 +66,44 @@ CREATE TABLE `u_account` (
-- Records of u_account
-- ----------------------------
-- ----------------------------
-- Table structure for u_account_package
-- ----------------------------
DROP TABLE IF EXISTS `u_account_package`;
CREATE TABLE `u_account_package` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`account_id` bigint(20) NULL DEFAULT NULL COMMENT '账户ID',
`package_id` bigint(20) NULL DEFAULT NULL COMMENT '套餐ID',
`traffic` bigint(20) NULL DEFAULT NULL COMMENT '流量',
`duration` bigint(20) NULL DEFAULT NULL COMMENT '时长',
`client_num` int(11) NULL DEFAULT NULL COMMENT '在线设备数',
`expired_time` datetime NULL DEFAULT NULL COMMENT '失效时间',
`package_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '套餐名称',
`period_num` int(11) NULL DEFAULT NULL COMMENT '有效期数',
`period_type` tinyint(4) NULL DEFAULT NULL COMMENT '有效期类型',
`price` decimal(18, 4) NULL DEFAULT NULL COMMENT '价格',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`rate_limit_enable` tinyint(1) NULL DEFAULT 0 COMMENT '带宽是否限制',
`traffic_enable` tinyint(1) NULL DEFAULT 0 COMMENT '流量是否限制',
`duration_enable` tinyint(1) NULL DEFAULT 0 COMMENT '时长是否限制',
`client_num_enable` tinyint(1) NULL DEFAULT 0 COMMENT '在线设备数是否限制',
`rate_limit_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '限速名称',
`down_limit` bigint(20) NULL DEFAULT NULL COMMENT '下行限速',
`down_limit_enable` tinyint(1) NULL DEFAULT 0 COMMENT '下行限速启用',
`up_limit` bigint(20) NULL DEFAULT NULL COMMENT '上行限速',
`up_limit_enable` tinyint(1) NULL DEFAULT 0 COMMENT '上行限速启用',
`del_flag` tinyint(1) NULL DEFAULT 0 COMMENT '删除标志0存在 1删除',
`create_by` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_by` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台-账户套餐表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of u_account_package
-- ----------------------------
-- ----------------------------
-- Table structure for u_balance
-- ----------------------------