2019-10-29 15:33:36 +08:00
|
|
|
-- Adminer 4.7.3 MySQL dump
|
|
|
|
|
|
|
|
SET NAMES utf8;
|
|
|
|
SET time_zone = '+00:00';
|
|
|
|
SET foreign_key_checks = 0;
|
|
|
|
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `v2_invite_code`;
|
|
|
|
CREATE TABLE `v2_invite_code` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`user_id` int(11) NOT NULL,
|
|
|
|
`code` char(32) NOT NULL,
|
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2019-12-12 13:45:46 +08:00
|
|
|
DROP TABLE IF EXISTS `v2_notice`;
|
|
|
|
CREATE TABLE `v2_notice` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`title` varchar(255) NOT NULL,
|
|
|
|
`content` text NOT NULL,
|
2019-12-13 17:07:46 +08:00
|
|
|
`img_url` varchar(255) DEFAULT NULL,
|
2019-12-12 13:45:46 +08:00
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2019-10-29 15:33:36 +08:00
|
|
|
DROP TABLE IF EXISTS `v2_order`;
|
|
|
|
CREATE TABLE `v2_order` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`invite_user_id` int(11) DEFAULT NULL,
|
|
|
|
`user_id` int(11) NOT NULL,
|
|
|
|
`plan_id` int(11) NOT NULL,
|
2019-11-27 19:55:53 +08:00
|
|
|
`type` int(11) NOT NULL COMMENT '1新购2续费3升级',
|
2019-10-29 15:33:36 +08:00
|
|
|
`cycle` varchar(255) NOT NULL,
|
|
|
|
`trade_no` varchar(36) NOT NULL,
|
|
|
|
`callback_no` varchar(255) DEFAULT NULL,
|
|
|
|
`total_amount` int(11) NOT NULL,
|
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`commission_status` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`commission_balance` int(11) NOT NULL DEFAULT '0',
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `v2_plan`;
|
|
|
|
CREATE TABLE `v2_plan` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`group_id` int(11) NOT NULL,
|
|
|
|
`transfer_enable` int(11) NOT NULL,
|
|
|
|
`name` varchar(255) NOT NULL,
|
|
|
|
`show` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`renew` tinyint(1) NOT NULL DEFAULT '1',
|
|
|
|
`content` text,
|
2019-12-29 13:21:36 +08:00
|
|
|
`month_price` int(11) DEFAULT '0',
|
|
|
|
`quarter_price` int(11) DEFAULT '0',
|
|
|
|
`half_year_price` int(11) DEFAULT '0',
|
|
|
|
`year_price` int(11) DEFAULT '0',
|
2019-10-29 15:33:36 +08:00
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2019-12-27 15:14:49 +08:00
|
|
|
SET NAMES utf8mb4;
|
|
|
|
|
2019-10-29 15:33:36 +08:00
|
|
|
DROP TABLE IF EXISTS `v2_server`;
|
|
|
|
CREATE TABLE `v2_server` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`group_id` varchar(255) NOT NULL,
|
2019-12-29 13:21:36 +08:00
|
|
|
`parent_id` int(11) DEFAULT NULL,
|
2019-12-27 15:14:49 +08:00
|
|
|
`name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
|
2019-10-29 15:33:36 +08:00
|
|
|
`host` varchar(255) NOT NULL,
|
|
|
|
`port` int(11) NOT NULL,
|
|
|
|
`server_port` int(11) NOT NULL,
|
|
|
|
`tls` tinyint(4) NOT NULL,
|
2019-11-04 19:56:22 +08:00
|
|
|
`tags` varchar(255) DEFAULT NULL,
|
2019-10-29 15:33:36 +08:00
|
|
|
`rate` varchar(11) NOT NULL,
|
2019-11-06 12:36:38 +08:00
|
|
|
`network` varchar(11) NOT NULL,
|
|
|
|
`settings` text,
|
2019-11-22 13:02:19 +08:00
|
|
|
`show` tinyint(1) NOT NULL DEFAULT '0',
|
2019-10-29 15:33:36 +08:00
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `v2_server_group`;
|
|
|
|
CREATE TABLE `v2_server_group` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` varchar(255) NOT NULL,
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `v2_server_log`;
|
|
|
|
CREATE TABLE `v2_server_log` (
|
|
|
|
`user_id` int(11) NOT NULL,
|
2019-12-23 16:31:07 +08:00
|
|
|
`server_id` int(11) NOT NULL,
|
2019-10-29 15:33:36 +08:00
|
|
|
`u` varchar(255) NOT NULL,
|
|
|
|
`d` varchar(255) NOT NULL,
|
|
|
|
`rate` int(11) NOT NULL,
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2019-12-13 17:07:46 +08:00
|
|
|
DROP TABLE IF EXISTS `v2_ticket`;
|
|
|
|
CREATE TABLE `v2_ticket` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`user_id` int(11) NOT NULL,
|
2019-12-13 17:09:15 +08:00
|
|
|
`last_reply_user_id` int(11) NOT NULL,
|
2019-12-13 17:07:46 +08:00
|
|
|
`subject` varchar(255) NOT NULL,
|
|
|
|
`level` tinyint(1) NOT NULL,
|
2019-12-13 17:29:55 +08:00
|
|
|
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:已开启 1:已关闭',
|
2019-12-13 17:07:46 +08:00
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `v2_ticket_message`;
|
|
|
|
CREATE TABLE `v2_ticket_message` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`user_id` int(11) NOT NULL,
|
|
|
|
`ticket_id` int(11) NOT NULL,
|
|
|
|
`message` varchar(255) NOT NULL,
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2019-10-29 15:33:36 +08:00
|
|
|
DROP TABLE IF EXISTS `v2_user`;
|
|
|
|
CREATE TABLE `v2_user` (
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
`invite_user_id` int(11) DEFAULT NULL,
|
|
|
|
`email` varchar(64) NOT NULL,
|
|
|
|
`password` varchar(64) NOT NULL,
|
2019-11-29 01:16:15 +08:00
|
|
|
`balance` int(11) NOT NULL DEFAULT '0',
|
2019-11-27 19:55:53 +08:00
|
|
|
`commission_rate` int(11) DEFAULT NULL,
|
2019-10-29 15:33:36 +08:00
|
|
|
`commission_balance` int(11) NOT NULL DEFAULT '0',
|
|
|
|
`t` int(11) NOT NULL DEFAULT '0',
|
|
|
|
`u` bigint(20) NOT NULL DEFAULT '0',
|
|
|
|
`d` bigint(20) NOT NULL DEFAULT '0',
|
|
|
|
`transfer_enable` bigint(20) NOT NULL DEFAULT '0',
|
2019-11-23 23:25:29 +08:00
|
|
|
`enable` tinyint(1) NOT NULL DEFAULT '1',
|
2019-10-29 15:33:36 +08:00
|
|
|
`banned` tinyint(1) NOT NULL DEFAULT '0',
|
|
|
|
`is_admin` tinyint(1) NOT NULL DEFAULT '0',
|
2019-12-19 22:22:31 +08:00
|
|
|
`last_login_at` int(11) DEFAULT NULL,
|
2019-10-29 15:33:36 +08:00
|
|
|
`last_login_ip` int(11) DEFAULT NULL,
|
|
|
|
`v2ray_uuid` varchar(36) NOT NULL,
|
|
|
|
`v2ray_alter_id` tinyint(4) NOT NULL DEFAULT '2',
|
|
|
|
`v2ray_level` tinyint(4) NOT NULL DEFAULT '0',
|
|
|
|
`group_id` int(11) DEFAULT NULL,
|
|
|
|
`plan_id` int(11) DEFAULT NULL,
|
|
|
|
`remind_expire` tinyint(4) DEFAULT '1',
|
|
|
|
`remind_traffic` tinyint(4) DEFAULT '1',
|
|
|
|
`token` char(32) NOT NULL,
|
|
|
|
`expired_at` bigint(20) NOT NULL DEFAULT '0',
|
|
|
|
`created_at` int(11) NOT NULL,
|
|
|
|
`updated_at` int(11) NOT NULL,
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `email` (`email`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2019-12-29 13:21:36 +08:00
|
|
|
-- 2019-12-29 04:58:01
|