update: stat user

This commit is contained in:
tokumeikoi
2022-02-20 01:06:02 +08:00
parent 23f98d7abc
commit c270f3ab5a
8 changed files with 168 additions and 35 deletions

View File

@ -308,6 +308,23 @@ CREATE TABLE `v2_stat_server` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='节点数据统计';
DROP TABLE IF EXISTS `v2_stat_user`;
CREATE TABLE `v2_stat_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL,
`server_type` char(11) NOT NULL,
`server_rate` decimal(10,2) NOT NULL,
`u` bigint(20) NOT NULL,
`d` bigint(20) NOT NULL,
`record_type` char(2) NOT NULL,
`record_at` int(11) NOT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `v2_ticket`;
CREATE TABLE `v2_ticket` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@ -372,4 +389,4 @@ CREATE TABLE `v2_user` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2022-02-16 19:16:57
-- 2022-02-19 16:59:30

View File

@ -489,3 +489,18 @@ ALTER TABLE `v2_order`
ALTER TABLE `v2_server_v2ray`
CHANGE `port` `port` char(11) NOT NULL AFTER `host`;
CREATE TABLE `v2_stat_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL,
`server_type` char(11) NOT NULL,
`server_rate` decimal(10,2) NOT NULL,
`u` bigint(20) NOT NULL,
`d` bigint(20) NOT NULL,
`record_type` char(2) NOT NULL,
`record_at` int(11) NOT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;