feat: add order buy
This commit is contained in:
@@ -190,6 +190,7 @@ 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',
|
||||
@@ -771,7 +772,7 @@ CREATE TABLE `u_package` (
|
||||
`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` varchar(32) 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 '时长',
|
||||
@@ -806,22 +807,59 @@ CREATE TABLE `u_rate_limit` (
|
||||
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` int(11) DEFAULT NULL COMMENT '订单类型(0套餐 1充值)',
|
||||
`type` tinyint(4) DEFAULT NULL COMMENT '订单类型(0套餐 1充值)',
|
||||
`order_amount` decimal(18,4) DEFAULT NULL COMMENT '订单金额',
|
||||
`status` int(11) DEFAULT NULL COMMENT '订单状态(0待支付 1已支付 2已取消)',
|
||||
`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=latin1 COMMENT='用户平台-订单表';
|
||||
) 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;
|
||||
|
||||
Reference in New Issue
Block a user