update: user remarks

This commit is contained in:
tokumeikoi 2021-01-21 23:29:15 +09:00
parent f7a7c21c16
commit 007b10d925
4 changed files with 241 additions and 236 deletions

View File

@ -27,7 +27,8 @@ class UserUpdate extends FormRequest
'u' => 'integer', 'u' => 'integer',
'd' => 'integer', 'd' => 'integer',
'balance' => 'integer', 'balance' => 'integer',
'commission_balance' => 'integer' 'commission_balance' => 'integer',
'remarks' => 'nullable'
]; ];
} }

View File

@ -9,325 +9,326 @@ SET NAMES utf8mb4;
DROP TABLE IF EXISTS `failed_jobs`; DROP TABLE IF EXISTS `failed_jobs`;
CREATE TABLE `failed_jobs` ( CREATE TABLE `failed_jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`connection` text COLLATE utf8mb4_unicode_ci NOT NULL, `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
`queue` text COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(), `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `v2_coupon`; DROP TABLE IF EXISTS `v2_coupon`;
CREATE TABLE `v2_coupon` ( CREATE TABLE `v2_coupon` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL, `code` varchar(255) NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
`type` tinyint(1) NOT NULL, `type` tinyint(1) NOT NULL,
`value` int(11) NOT NULL, `value` int(11) NOT NULL,
`limit_use` int(11) DEFAULT NULL, `limit_use` int(11) DEFAULT NULL,
`limit_plan_ids` varchar(255) DEFAULT NULL, `limit_plan_ids` varchar(255) DEFAULT NULL,
`started_at` int(11) NOT NULL, `started_at` int(11) NOT NULL,
`ended_at` int(11) NOT NULL, `ended_at` int(11) NOT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_invite_code`; DROP TABLE IF EXISTS `v2_invite_code`;
CREATE TABLE `v2_invite_code` ( CREATE TABLE `v2_invite_code` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL, `user_id` int(11) NOT NULL,
`code` char(32) NOT NULL, `code` char(32) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT 0, `status` tinyint(1) NOT NULL DEFAULT 0,
`pv` int(11) NOT NULL DEFAULT 0, `pv` int(11) NOT NULL DEFAULT 0,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_knowledge`; DROP TABLE IF EXISTS `v2_knowledge`;
CREATE TABLE `v2_knowledge` ( CREATE TABLE `v2_knowledge` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`language` char(5) NOT NULL COMMENT '語言', `language` char(5) NOT NULL COMMENT '語言',
`category` varchar(255) NOT NULL COMMENT '分類名', `category` varchar(255) NOT NULL COMMENT '分類名',
`title` varchar(255) NOT NULL COMMENT '標題', `title` varchar(255) NOT NULL COMMENT '標題',
`body` text NOT NULL COMMENT '內容', `body` text NOT NULL COMMENT '內容',
`sort` int(11) DEFAULT NULL COMMENT '排序', `sort` int(11) DEFAULT NULL COMMENT '排序',
`show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '顯示', `show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '顯示',
`created_at` int(11) NOT NULL COMMENT '創建時間', `created_at` int(11) NOT NULL COMMENT '創建時間',
`updated_at` int(11) NOT NULL COMMENT '更新時間', `updated_at` int(11) NOT NULL COMMENT '更新時間',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='知識庫'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='知識庫';
DROP TABLE IF EXISTS `v2_mail_log`; DROP TABLE IF EXISTS `v2_mail_log`;
CREATE TABLE `v2_mail_log` ( CREATE TABLE `v2_mail_log` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(64) NOT NULL, `email` varchar(64) NOT NULL,
`subject` varchar(255) NOT NULL, `subject` varchar(255) NOT NULL,
`template_name` varchar(255) NOT NULL, `template_name` varchar(255) NOT NULL,
`error` text DEFAULT NULL, `error` text DEFAULT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_notice`; DROP TABLE IF EXISTS `v2_notice`;
CREATE TABLE `v2_notice` ( CREATE TABLE `v2_notice` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL, `title` varchar(255) NOT NULL,
`content` text NOT NULL, `content` text NOT NULL,
`img_url` varchar(255) DEFAULT NULL, `img_url` varchar(255) DEFAULT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_order`; DROP TABLE IF EXISTS `v2_order`;
CREATE TABLE `v2_order` ( CREATE TABLE `v2_order` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`invite_user_id` int(11) DEFAULT NULL, `invite_user_id` int(11) DEFAULT NULL,
`user_id` int(11) NOT NULL, `user_id` int(11) NOT NULL,
`plan_id` int(11) NOT NULL, `plan_id` int(11) NOT NULL,
`coupon_id` int(11) DEFAULT NULL, `coupon_id` int(11) DEFAULT NULL,
`type` int(11) NOT NULL COMMENT '1新购2续费3升级', `type` int(11) NOT NULL COMMENT '1新购2续费3升级',
`cycle` varchar(255) NOT NULL, `cycle` varchar(255) NOT NULL,
`trade_no` varchar(36) NOT NULL, `trade_no` varchar(36) NOT NULL,
`callback_no` varchar(255) DEFAULT NULL, `callback_no` varchar(255) DEFAULT NULL,
`total_amount` int(11) NOT NULL, `total_amount` int(11) NOT NULL,
`discount_amount` int(11) DEFAULT NULL, `discount_amount` int(11) DEFAULT NULL,
`surplus_amount` int(11) DEFAULT NULL COMMENT '剩余价值', `surplus_amount` int(11) DEFAULT NULL COMMENT '剩余价值',
`refund_amount` int(11) DEFAULT NULL COMMENT '退款金额', `refund_amount` int(11) DEFAULT NULL COMMENT '退款金额',
`balance_amount` int(11) DEFAULT NULL COMMENT '使用余额', `balance_amount` int(11) DEFAULT NULL COMMENT '使用余额',
`surplus_order_ids` text DEFAULT NULL COMMENT '折抵订单', `surplus_order_ids` text DEFAULT NULL COMMENT '折抵订单',
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0待支付1开通中2已取消3已完成4已折抵', `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0待支付1开通中2已取消3已完成4已折抵',
`commission_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0待确认1发放中2有效3无效', `commission_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0待确认1发放中2有效3无效',
`commission_balance` int(11) NOT NULL DEFAULT 0, `commission_balance` int(11) NOT NULL DEFAULT 0,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_plan`; DROP TABLE IF EXISTS `v2_plan`;
CREATE TABLE `v2_plan` ( CREATE TABLE `v2_plan` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL, `group_id` int(11) NOT NULL,
`transfer_enable` int(11) NOT NULL, `transfer_enable` int(11) NOT NULL,
`name` varchar(255) NOT NULL, `name` varchar(255) NOT NULL,
`show` tinyint(1) NOT NULL DEFAULT 0, `show` tinyint(1) NOT NULL DEFAULT 0,
`sort` int(11) DEFAULT NULL, `sort` int(11) DEFAULT NULL,
`renew` tinyint(1) NOT NULL DEFAULT 1, `renew` tinyint(1) NOT NULL DEFAULT 1,
`content` text DEFAULT NULL, `content` text DEFAULT NULL,
`month_price` int(11) DEFAULT NULL, `month_price` int(11) DEFAULT NULL,
`quarter_price` int(11) DEFAULT NULL, `quarter_price` int(11) DEFAULT NULL,
`half_year_price` int(11) DEFAULT NULL, `half_year_price` int(11) DEFAULT NULL,
`year_price` int(11) DEFAULT NULL, `year_price` int(11) DEFAULT NULL,
`two_year_price` int(11) DEFAULT NULL, `two_year_price` int(11) DEFAULT NULL,
`three_year_price` int(11) DEFAULT NULL, `three_year_price` int(11) DEFAULT NULL,
`onetime_price` int(11) DEFAULT NULL, `onetime_price` int(11) DEFAULT NULL,
`reset_price` int(11) DEFAULT NULL, `reset_price` int(11) DEFAULT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_server`; DROP TABLE IF EXISTS `v2_server`;
CREATE TABLE `v2_server` ( CREATE TABLE `v2_server` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` varchar(255) NOT NULL, `group_id` varchar(255) NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
`parent_id` int(11) DEFAULT NULL, `parent_id` int(11) DEFAULT NULL,
`host` varchar(255) NOT NULL, `host` varchar(255) NOT NULL,
`port` int(11) NOT NULL, `port` int(11) NOT NULL,
`server_port` int(11) NOT NULL, `server_port` int(11) NOT NULL,
`tls` tinyint(4) NOT NULL DEFAULT 0, `tls` tinyint(4) NOT NULL DEFAULT 0,
`tags` varchar(255) DEFAULT NULL, `tags` varchar(255) DEFAULT NULL,
`rate` varchar(11) NOT NULL, `rate` varchar(11) NOT NULL,
`network` text NOT NULL, `network` text NOT NULL,
`alter_id` int(11) NOT NULL DEFAULT 1, `alter_id` int(11) NOT NULL DEFAULT 1,
`settings` text DEFAULT NULL, `settings` text DEFAULT NULL,
`rules` text DEFAULT NULL, `rules` text DEFAULT NULL,
`networkSettings` text DEFAULT NULL, `networkSettings` text DEFAULT NULL,
`tlsSettings` text DEFAULT NULL, `tlsSettings` text DEFAULT NULL,
`ruleSettings` text DEFAULT NULL, `ruleSettings` text DEFAULT NULL,
`dnsSettings` text DEFAULT NULL, `dnsSettings` text DEFAULT NULL,
`show` tinyint(1) NOT NULL DEFAULT 0, `show` tinyint(1) NOT NULL DEFAULT 0,
`sort` int(11) DEFAULT NULL, `sort` int(11) DEFAULT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_server_group`; DROP TABLE IF EXISTS `v2_server_group`;
CREATE TABLE `v2_server_group` ( CREATE TABLE `v2_server_group` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL, `name` varchar(255) NOT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_server_log`; DROP TABLE IF EXISTS `v2_server_log`;
CREATE TABLE `v2_server_log` ( CREATE TABLE `v2_server_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT, `id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL, `user_id` int(11) NOT NULL,
`server_id` int(11) NOT NULL, `server_id` int(11) NOT NULL,
`u` varchar(255) NOT NULL, `u` varchar(255) NOT NULL,
`d` varchar(255) NOT NULL, `d` varchar(255) NOT NULL,
`rate` decimal(10,2) NOT NULL, `rate` decimal(10,2) NOT NULL,
`method` varchar(255) NOT NULL, `method` varchar(255) NOT NULL,
`log_at` int(11) NOT NULL, `log_at` int(11) NOT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `log_at` (`log_at`) KEY `log_at` (`log_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_server_shadowsocks`; DROP TABLE IF EXISTS `v2_server_shadowsocks`;
CREATE TABLE `v2_server_shadowsocks` ( CREATE TABLE `v2_server_shadowsocks` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` varchar(255) NOT NULL, `group_id` varchar(255) NOT NULL,
`parent_id` int(11) DEFAULT NULL, `parent_id` int(11) DEFAULT NULL,
`tags` varchar(255) DEFAULT NULL, `tags` varchar(255) DEFAULT NULL,
`name` varchar(255) NOT NULL, `name` varchar(255) NOT NULL,
`rate` varchar(11) NOT NULL, `rate` varchar(11) NOT NULL,
`host` varchar(255) NOT NULL, `host` varchar(255) NOT NULL,
`port` int(11) NOT NULL, `port` int(11) NOT NULL,
`server_port` int(11) NOT NULL, `server_port` int(11) NOT NULL,
`cipher` varchar(255) NOT NULL, `cipher` varchar(255) NOT NULL,
`show` tinyint(4) NOT NULL DEFAULT 0, `show` tinyint(4) NOT NULL DEFAULT 0,
`sort` int(11) DEFAULT NULL, `sort` int(11) DEFAULT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `v2_server_trojan`; DROP TABLE IF EXISTS `v2_server_trojan`;
CREATE TABLE `v2_server_trojan` ( CREATE TABLE `v2_server_trojan` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '节点ID', `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '节点ID',
`group_id` varchar(255) NOT NULL COMMENT '节点组', `group_id` varchar(255) NOT NULL COMMENT '节点组',
`parent_id` int(11) DEFAULT NULL COMMENT '父节点', `parent_id` int(11) DEFAULT NULL COMMENT '父节点',
`tags` varchar(255) DEFAULT NULL COMMENT '节点标签', `tags` varchar(255) DEFAULT NULL COMMENT '节点标签',
`name` varchar(255) NOT NULL COMMENT '节点名称', `name` varchar(255) NOT NULL COMMENT '节点名称',
`rate` varchar(11) NOT NULL COMMENT '倍率', `rate` varchar(11) NOT NULL COMMENT '倍率',
`host` varchar(255) NOT NULL COMMENT '主机名', `host` varchar(255) NOT NULL COMMENT '主机名',
`port` int(11) NOT NULL COMMENT '连接端口', `port` int(11) NOT NULL COMMENT '连接端口',
`server_port` int(11) NOT NULL COMMENT '服务端口', `server_port` int(11) NOT NULL COMMENT '服务端口',
`allow_insecure` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否允许不安全', `allow_insecure` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否允许不安全',
`server_name` varchar(255) DEFAULT NULL, `server_name` varchar(255) DEFAULT NULL,
`show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示', `show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示',
`sort` int(11) DEFAULT NULL, `sort` int(11) DEFAULT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='trojan伺服器表'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='trojan伺服器表';
DROP TABLE IF EXISTS `v2_stat_order`; DROP TABLE IF EXISTS `v2_stat_order`;
CREATE TABLE `v2_stat_order` ( CREATE TABLE `v2_stat_order` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`order_count` int(11) NOT NULL COMMENT '订单数量', `order_count` int(11) NOT NULL COMMENT '订单数量',
`order_amount` int(11) NOT NULL COMMENT '订单合计', `order_amount` int(11) NOT NULL COMMENT '订单合计',
`commission_count` int(11) NOT NULL, `commission_count` int(11) NOT NULL,
`commission_amount` int(11) NOT NULL COMMENT '佣金合计', `commission_amount` int(11) NOT NULL COMMENT '佣金合计',
`record_type` char(1) NOT NULL, `record_type` char(1) NOT NULL,
`record_at` int(11) NOT NULL, `record_at` int(11) NOT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `record_at` (`record_at`) UNIQUE KEY `record_at` (`record_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单统计'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单统计';
DROP TABLE IF EXISTS `v2_stat_server`; DROP TABLE IF EXISTS `v2_stat_server`;
CREATE TABLE `v2_stat_server` ( CREATE TABLE `v2_stat_server` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`server_id` int(11) NOT NULL COMMENT '节点id', `server_id` int(11) NOT NULL COMMENT '节点id',
`server_type` char(11) NOT NULL COMMENT '节点类型', `server_type` char(11) NOT NULL COMMENT '节点类型',
`u` varchar(255) NOT NULL, `u` varchar(255) NOT NULL,
`d` varchar(255) NOT NULL, `d` varchar(255) NOT NULL,
`record_type` char(1) NOT NULL COMMENT 'd day m month', `record_type` char(1) NOT NULL COMMENT 'd day m month',
`record_at` int(11) NOT NULL COMMENT '记录时间', `record_at` int(11) NOT NULL COMMENT '记录时间',
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `server_id_server_type_record_at` (`server_id`,`server_type`,`record_at`), UNIQUE KEY `server_id_server_type_record_at` (`server_id`,`server_type`,`record_at`),
KEY `record_at` (`record_at`), KEY `record_at` (`record_at`),
KEY `server_id` (`server_id`) KEY `server_id` (`server_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='节点数据统计'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='节点数据统计';
DROP TABLE IF EXISTS `v2_ticket`; DROP TABLE IF EXISTS `v2_ticket`;
CREATE TABLE `v2_ticket` ( CREATE TABLE `v2_ticket` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL, `user_id` int(11) NOT NULL,
`last_reply_user_id` int(11) NOT NULL, `last_reply_user_id` int(11) NOT NULL,
`subject` varchar(255) NOT NULL, `subject` varchar(255) NOT NULL,
`level` tinyint(1) NOT NULL, `level` tinyint(1) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:已开启 1:已关闭', `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:已开启 1:已关闭',
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_ticket_message`; DROP TABLE IF EXISTS `v2_ticket_message`;
CREATE TABLE `v2_ticket_message` ( CREATE TABLE `v2_ticket_message` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL, `user_id` int(11) NOT NULL,
`ticket_id` int(11) NOT NULL, `ticket_id` int(11) NOT NULL,
`message` varchar(255) NOT NULL, `message` varchar(255) NOT NULL,
`created_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `v2_user`; DROP TABLE IF EXISTS `v2_user`;
CREATE TABLE `v2_user` ( CREATE TABLE `v2_user` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`invite_user_id` int(11) DEFAULT NULL, `invite_user_id` int(11) DEFAULT NULL,
`telegram_id` bigint(20) DEFAULT NULL, `telegram_id` bigint(20) DEFAULT NULL,
`email` varchar(64) NOT NULL, `email` varchar(64) NOT NULL,
`password` varchar(64) NOT NULL, `password` varchar(64) NOT NULL,
`password_algo` char(10) DEFAULT NULL, `password_algo` char(10) DEFAULT NULL,
`balance` int(11) NOT NULL DEFAULT 0, `balance` int(11) NOT NULL DEFAULT 0,
`discount` int(11) DEFAULT NULL, `discount` int(11) DEFAULT NULL,
`commission_rate` int(11) DEFAULT NULL, `commission_rate` int(11) DEFAULT NULL,
`commission_balance` int(11) NOT NULL DEFAULT 0, `commission_balance` int(11) NOT NULL DEFAULT 0,
`t` int(11) NOT NULL DEFAULT 0, `t` int(11) NOT NULL DEFAULT 0,
`u` bigint(20) NOT NULL DEFAULT 0, `u` bigint(20) NOT NULL DEFAULT 0,
`d` bigint(20) NOT NULL DEFAULT 0, `d` bigint(20) NOT NULL DEFAULT 0,
`transfer_enable` bigint(20) NOT NULL DEFAULT 0, `transfer_enable` bigint(20) NOT NULL DEFAULT 0,
`banned` tinyint(1) NOT NULL DEFAULT 0, `banned` tinyint(1) NOT NULL DEFAULT 0,
`is_admin` tinyint(1) NOT NULL DEFAULT 0, `is_admin` tinyint(1) NOT NULL DEFAULT 0,
`is_staff` tinyint(1) NOT NULL DEFAULT 0, `is_staff` tinyint(1) NOT NULL DEFAULT 0,
`last_login_at` int(11) DEFAULT NULL, `last_login_at` int(11) DEFAULT NULL,
`last_login_ip` int(11) DEFAULT NULL, `last_login_ip` int(11) DEFAULT NULL,
`uuid` varchar(36) NOT NULL, `uuid` varchar(36) NOT NULL,
`group_id` int(11) DEFAULT NULL, `group_id` int(11) DEFAULT NULL,
`plan_id` int(11) DEFAULT NULL, `plan_id` int(11) DEFAULT NULL,
`remind_expire` tinyint(4) DEFAULT 1, `remind_expire` tinyint(4) DEFAULT 1,
`remind_traffic` tinyint(4) DEFAULT 1, `remind_traffic` tinyint(4) DEFAULT 1,
`token` char(32) NOT NULL, `token` char(32) NOT NULL,
`expired_at` bigint(20) DEFAULT 0, `remarks` text DEFAULT NULL,
`created_at` int(11) NOT NULL, `expired_at` bigint(20) DEFAULT 0,
`updated_at` int(11) NOT NULL, `created_at` int(11) NOT NULL,
PRIMARY KEY (`id`), `updated_at` int(11) NOT NULL,
UNIQUE KEY `email` (`email`) PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2020-12-24 14:02:39 -- 2021-01-21 14:25:17

View File

@ -391,3 +391,6 @@ CREATE TABLE `v2_stat_order` (
ALTER TABLE `v2_user` ALTER TABLE `v2_user`
DROP `enable`; DROP `enable`;
ALTER TABLE `v2_user`
ADD `remarks` text COLLATE 'utf8_general_ci' NULL AFTER `token`;

File diff suppressed because one or more lines are too long