2
0

feat: renew sql from db

This commit is contained in:
zhangsz
2024-12-24 20:53:52 +08:00
parent 6fa0ff1354
commit c02cc6fb64
3 changed files with 274 additions and 179 deletions

View File

@@ -11,16 +11,77 @@
Target Server Version : 50744 (5.7.44)
File Encoding : 65001
Date: 18/12/2024 10:18:09
Date: 24/12/2024 20:36:50
*/
-- DROP DATABASE IF EXISTS `wfc_user_db`;
CREATE DATABASE IF NOT EXISTS `wfc_user_db` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
USE wfc_user_db;
-- ----------------------------
-- Table structure for u_account
-- ----------------------------
DROP TABLE IF EXISTS `u_account`;
CREATE TABLE `u_account` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID',
`balance` decimal(18, 4) NULL DEFAULT NULL COMMENT '余额',
`package_id` bigint(20) NULL DEFAULT NULL COMMENT '套餐ID',
`start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
`traffic_used` bigint(20) NULL DEFAULT NULL COMMENT '流量已使用',
`duration_used` bigint(20) NULL DEFAULT NULL COMMENT '时长已使用',
`client_num_used` int(11) 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 '价格',
`traffic` bigint(20) NULL DEFAULT NULL COMMENT '流量',
`duration` bigint(20) NULL DEFAULT NULL COMMENT '时长',
`client_num` int(11) 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
-- ----------------------------
-- ----------------------------
-- Table structure for u_balance
-- ----------------------------
DROP TABLE IF EXISTS `u_balance`;
CREATE TABLE `u_balance` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Service ID',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT 'User ID link to u_user',
`balance` double NULL DEFAULT NULL COMMENT 'User charging money balance',
`traffic_balance` bigint(20) NULL DEFAULT NULL COMMENT 'User traffic package balance',
`status` enum('Normal','Shutdown','Arrears') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 'Normal',
`create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'create name ',
`create_time` datetime NULL DEFAULT NULL COMMENT 'create time',
`update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'update by name ',
`update_time` datetime NULL DEFAULT NULL COMMENT 'update at time',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_user_id`(`user_id`) USING BTREE,
CONSTRAINT `u_balance_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `u_user` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户平台_用户信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of u_balance
-- ----------------------------
-- ----------------------------
-- Table structure for u_bill
@@ -190,7 +251,6 @@ DROP TABLE IF EXISTS `u_client`;
CREATE TABLE `u_client` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Client ID',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT 'User ID link to u_user',
`site_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'Site ID',
`client_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'Client Name',
`client_device_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'Client device type',
`client_mac` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'Client mac address',
@@ -384,7 +444,7 @@ CREATE TABLE `u_logininfor` (
PRIMARY KEY (`info_id`) USING BTREE,
INDEX `idx_u_logininfor_s`(`status`) USING BTREE,
INDEX `idx_u_logininfor_lt`(`access_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 75 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台_系统访问记录' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 76 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台_系统访问记录' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of u_logininfor
@@ -463,6 +523,7 @@ INSERT INTO `u_logininfor` VALUES (71, '123456', '192.168.2.167', '0', '登录
INSERT INTO `u_logininfor` VALUES (72, '123456', '192.168.2.167', '0', '登录成功', '2024-12-13 17:42:27');
INSERT INTO `u_logininfor` VALUES (73, '123456', '192.168.2.94', '0', '登录成功', '2024-12-13 18:16:34');
INSERT INTO `u_logininfor` VALUES (74, '123456', '192.168.2.94', '0', '登录成功', '2024-12-16 17:36:08');
INSERT INTO `u_logininfor` VALUES (75, 'test12', '192.168.2.29', '0', '注册成功', '2024-12-24 17:48:17');
-- ----------------------------
-- Table structure for u_menu
@@ -570,6 +631,63 @@ CREATE TABLE `u_oper_log` (
-- Records of u_oper_log
-- ----------------------------
-- ----------------------------
-- Table structure for u_order
-- ----------------------------
DROP TABLE IF EXISTS `u_order`;
CREATE TABLE `u_order` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT '用户ID',
`package_id` bigint(20) NULL DEFAULT NULL COMMENT '套餐ID',
`payment_id` bigint(20) NULL DEFAULT NULL COMMENT '支付ID',
`order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单编号',
`type` tinyint(4) NULL DEFAULT NULL COMMENT '订单类型0套餐 1充值',
`order_amount` decimal(18, 4) NULL DEFAULT NULL COMMENT '订单金额',
`status` tinyint(4) NULL DEFAULT NULL COMMENT '订单状态(0待支付 1已支付 2已取消)',
`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_order
-- ----------------------------
-- ----------------------------
-- Table structure for u_package
-- ----------------------------
DROP TABLE IF EXISTS `u_package`;
CREATE TABLE `u_package` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`rate_limit_id` bigint(20) NULL DEFAULT NULL COMMENT '带宽限速ID',
`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 '价格',
`traffic` bigint(20) NULL DEFAULT NULL COMMENT '流量',
`duration` bigint(20) NULL DEFAULT NULL COMMENT '时长',
`client_num` int(11) 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 '在线设备数是否限制',
`package_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_package
-- ----------------------------
-- ----------------------------
-- Table structure for u_post
-- ----------------------------
@@ -592,6 +710,29 @@ CREATE TABLE `u_post` (
-- Records of u_post
-- ----------------------------
-- ----------------------------
-- Table structure for u_rate_limit
-- ----------------------------
DROP TABLE IF EXISTS `u_rate_limit`;
CREATE TABLE `u_rate_limit` (
`id` bigint(20) NOT NULL AUTO_INCREMENT 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_rate_limit
-- ----------------------------
-- ----------------------------
-- Table structure for u_recharge
-- ----------------------------
@@ -673,29 +814,6 @@ INSERT INTO `u_role_menu` VALUES (2, 2010);
INSERT INTO `u_role_menu` VALUES (2, 2011);
INSERT INTO `u_role_menu` VALUES (2, 2012);
-- ----------------------------
-- Table structure for u_service
-- ----------------------------
DROP TABLE IF EXISTS `u_service`;
CREATE TABLE `u_service` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Service ID',
`user_id` bigint(20) NULL DEFAULT NULL COMMENT 'User ID link to u_user',
`balance` double NULL DEFAULT NULL COMMENT 'User charging money balance',
`traffic_balance` bigint(20) NULL DEFAULT NULL COMMENT 'User traffic package balance',
`status` enum('Normal','Shutdown','Arrears') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 'Normal',
`create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'create name ',
`create_time` datetime NULL DEFAULT NULL COMMENT 'create time',
`update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'update by name ',
`update_time` datetime NULL DEFAULT NULL COMMENT 'update at time',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_user_id`(`user_id`) USING BTREE,
CONSTRAINT `u_service_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `u_user` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户平台_用户信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of u_service
-- ----------------------------
-- ----------------------------
-- Table structure for u_user
-- ----------------------------
@@ -724,7 +842,7 @@ CREATE TABLE `u_user` (
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台_用户信息表' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台_用户信息表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of u_user
@@ -736,6 +854,7 @@ INSERT INTO `u_user` VALUES (4, NULL, 'test1', 'test1', NULL, '00', 'a@agt.com',
INSERT INTO `u_user` VALUES (5, NULL, 'test2', 'test2', NULL, '00', 'b@agt.com', '13823365857', '0', '', '$2a$10$lV6J2.WSOcvFaNY3AaRBWeYQYELpbakW4K.TSIrn35QEMzAfG8lB.', NULL, NULL, '0', '0', '192.168.2.63', '2024-12-10 15:56:06', '', '2024-12-10 15:52:18', '', '2024-12-10 15:56:06', NULL);
INSERT INTO `u_user` VALUES (6, NULL, 'test11', 'test11', NULL, '00', '112221@qq.com', '13824827333', '0', '', '$2a$10$jaVvjr0GjPwZL/Lz5raeu.yZi3k4knv0uFIBIGKSCgRE/NKLSvd/y', NULL, NULL, '0', '0', '', NULL, '', '2024-12-10 20:14:53', '', NULL, NULL);
INSERT INTO `u_user` VALUES (7, NULL, 'Arnotest', 'Arnotest', NULL, '00', '1755180131@qq.com', '', '0', '', '$2a$10$376HujK8UPqstpL4H9PZqOH62PTj0Jjhye6WgjFrmNQOSBZE/j2le', NULL, NULL, '0', '0', '', NULL, '', '2024-12-12 15:18:45', '', NULL, NULL);
INSERT INTO `u_user` VALUES (8, NULL, 'test12', 'test12', NULL, '00', 'test12@qq.com', '13823365855', '0', '', '$2a$10$QpWUCCYxckPOwd1mLI4sFuWCtwl8jcX9ZuftOAAULG26JTev61Wve', NULL, NULL, '0', '0', '', NULL, '', '2024-12-24 17:48:17', '', NULL, NULL);
-- ----------------------------
-- Table structure for u_user_post
@@ -766,100 +885,4 @@ CREATE TABLE `u_user_role` (
-- ----------------------------
INSERT INTO `u_user_role` VALUES (1, 1);
DROP TABLE IF EXISTS `u_package`;
CREATE TABLE `u_package` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`rate_limit_id` bigint(20) DEFAULT NULL COMMENT '带宽限速ID',
`package_name` varchar(64) DEFAULT NULL COMMENT '套餐名称',
`period_num` int(11) DEFAULT NULL COMMENT '有效期数',
`period_type` tinyint(4) DEFAULT NULL COMMENT '有效期类型',
`price` decimal(18,4) DEFAULT NULL COMMENT '价格',
`traffic` bigint(20) DEFAULT NULL COMMENT '流量',
`duration` bigint(20) DEFAULT NULL COMMENT '时长',
`client_num` int(11) DEFAULT NULL COMMENT '在线设备数',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`rate_limit_enable` tinyint(1) DEFAULT '0' COMMENT '带宽是否限制',
`traffic_enable` tinyint(1) DEFAULT '0' COMMENT '流量是否限制',
`duration_enable` tinyint(1) DEFAULT '0' COMMENT '时长是否限制',
`client_num_enable` tinyint(1) DEFAULT '0' COMMENT '在线设备数是否限制',
`package_enable` tinyint(1) DEFAULT '0' COMMENT '套餐是否启用',
`del_flag` tinyint(1) DEFAULT '0' COMMENT '删除标志0存在 1删除',
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户平台-套餐表';
DROP TABLE IF EXISTS `u_rate_limit`;
CREATE TABLE `u_rate_limit` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`rate_limit_name` varchar(32) DEFAULT NULL COMMENT '限速名称',
`down_limit` bigint(20) DEFAULT NULL COMMENT '下行限速',
`down_limit_enable` tinyint(1) DEFAULT '0' COMMENT '下行限速启用',
`up_limit` bigint(20) DEFAULT NULL COMMENT '上行限速',
`up_limit_enable` tinyint(1) DEFAULT '0' COMMENT '上行限速启用',
`del_flag` tinyint(1) DEFAULT '0' COMMENT '删除标志0存在 1删除',
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户平台-带宽限速表';
DROP TABLE IF EXISTS `u_order`;
CREATE TABLE `u_order` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`package_id` bigint(20) DEFAULT NULL COMMENT '套餐ID',
`payment_id` bigint(20) DEFAULT NULL COMMENT '支付ID',
`order_no` varchar(64) DEFAULT NULL COMMENT '订单编号',
`type` tinyint(4) DEFAULT NULL COMMENT '订单类型0套餐 1充值',
`order_amount` decimal(18,4) DEFAULT NULL COMMENT '订单金额',
`status` tinyint(4) DEFAULT NULL COMMENT '订单状态(0待支付 1已支付 2已取消)',
`del_flag` tinyint(1) DEFAULT '0' COMMENT '删除标志0存在 1删除',
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户平台-订单表';
DROP TABLE IF EXISTS u_account;
CREATE TABLE `u_account` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`balance` decimal(18,4) DEFAULT NULL COMMENT '余额',
`package_id` bigint(20) DEFAULT NULL COMMENT '套餐ID',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`traffic_used` bigint(20) DEFAULT NULL COMMENT '流量已使用',
`duration_used` bigint(20) DEFAULT NULL COMMENT '时长已使用',
`client_num_used` int(11) DEFAULT NULL COMMENT '在线设备数已使用',
`package_name` varchar(64) DEFAULT NULL COMMENT '套餐名称',
`period_num` int(11) DEFAULT NULL COMMENT '有效期数',
`period_type` tinyint(4) DEFAULT NULL COMMENT '有效期类型',
`price` decimal(18,4) DEFAULT NULL COMMENT '价格',
`traffic` bigint(20) DEFAULT NULL COMMENT '流量',
`duration` bigint(20) DEFAULT NULL COMMENT '时长',
`client_num` int(11) DEFAULT NULL COMMENT '在线设备数',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`rate_limit_enable` tinyint(1) DEFAULT '0' COMMENT '带宽是否限制',
`traffic_enable` tinyint(1) DEFAULT '0' COMMENT '流量是否限制',
`duration_enable` tinyint(1) DEFAULT '0' COMMENT '时长是否限制',
`client_num_enable` tinyint(1) DEFAULT '0' COMMENT '在线设备数是否限制',
`rate_limit_name` varchar(32) DEFAULT NULL COMMENT '限速名称',
`down_limit` bigint(20) DEFAULT NULL COMMENT '下行限速',
`down_limit_enable` tinyint(1) DEFAULT '0' COMMENT '下行限速启用',
`up_limit` bigint(20) DEFAULT NULL COMMENT '上行限速',
`up_limit_enable` tinyint(1) DEFAULT '0' COMMENT '上行限速启用',
`del_flag` tinyint(1) DEFAULT '0' COMMENT '删除标志0存在 1删除',
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户平台-账户表';
SET FOREIGN_KEY_CHECKS = 1;