db.sql 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  1. # ************************************************************
  2. # Sequel Pro SQL dump
  3. # Version 4541
  4. #
  5. # http://www.sequelpro.com/
  6. # https://github.com/sequelpro/sequelpro
  7. #
  8. # Host: 127.0.0.1 (MySQL 5.7.18)
  9. # Database: 2
  10. # Generation Time: 2017-07-29 06:28:10 +0000
  11. # ************************************************************
  12. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  13. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  14. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  15. /*!40101 SET NAMES utf8 */;
  16. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  17. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  18. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  19. -- ----------------------------
  20. -- Table structure for `ss_node`
  21. -- ----------------------------
  22. CREATE TABLE `ss_node` (
  23. `id` int(11) NOT NULL AUTO_INCREMENT,
  24. `name` varchar(128) NOT NULL DEFAULT '' COMMENT '名称',
  25. `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属分组',
  26. `country_code` char(5) DEFAULT '' COMMENT '国家代码',
  27. `server` varchar(128) NOT NULL DEFAULT '' COMMENT '服务器地址',
  28. `desc` varchar(255) DEFAULT '' COMMENT '节点简单描述',
  29. `method` varchar(32) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '加密方式',
  30. `custom_method` varchar(30) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '自定义加密方式',
  31. `protocol` varchar(128) NOT NULL DEFAULT 'auth_chain_a' COMMENT '协议',
  32. `protocol_param` varchar(128) DEFAULT '' COMMENT '协议参数',
  33. `obfs` varchar(128) NOT NULL DEFAULT 'tls1.2_ticket_auth' COMMENT '混淆',
  34. `obfs_param` varchar(128) DEFAULT '' COMMENT '混淆参数',
  35. `traffic_rate` float NOT NULL DEFAULT '1' COMMENT '流量比率',
  36. `bandwidth` int(11) NOT NULL DEFAULT '100' COMMENT '出口带宽,单位M',
  37. `traffic` bigint(20) NOT NULL DEFAULT '1000' COMMENT '每月可用流量,单位G',
  38. `monitor_url` varchar(255) DEFAULT NULL COMMENT '监控地址',
  39. `compatible` tinyint(4) DEFAULT '0' COMMENT '兼容SS',
  40. `single` tinyint(4) DEFAULT '0' COMMENT '单端口多用户:0-否、1-是',
  41. `single_force` tinyint(4) DEFAULT NULL COMMENT '模式:0-兼容模式、1-严格模式',
  42. `single_port` varchar(50) DEFAULT '' COMMENT '端口号,用,号分隔',
  43. `single_passwd` varchar(50) DEFAULT '' COMMENT '密码',
  44. `single_method` varchar(50) DEFAULT '' COMMENT '加密方式',
  45. `single_protocol` varchar(50) NOT NULL DEFAULT '' COMMENT '协议',
  46. `sort` int(3) NOT NULL DEFAULT '0' COMMENT '排序值,值越大越靠前显示',
  47. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-维护、1-正常',
  48. `created_at` datetime NOT NULL,
  49. `updated_at` datetime NOT NULL,
  50. PRIMARY KEY (`id`)
  51. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='节点信息表';
  52. -- ----------------------------
  53. -- Table structure for `ss_node_info`
  54. -- ----------------------------
  55. CREATE TABLE `ss_node_info` (
  56. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  57. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  58. `uptime` float NOT NULL COMMENT '更新时间',
  59. `load` varchar(32) NOT NULL COMMENT '负载',
  60. `log_time` int(11) NOT NULL COMMENT '记录时间',
  61. `created_at` datetime NOT NULL,
  62. `updated_at` datetime NOT NULL,
  63. PRIMARY KEY (`id`)
  64. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='节点负载信息';
  65. -- ----------------------------
  66. -- Table structure for `ss_node_online_log`
  67. -- ----------------------------
  68. CREATE TABLE `ss_node_online_log` (
  69. `id` int(11) NOT NULL AUTO_INCREMENT,
  70. `node_id` int(11) NOT NULL COMMENT '节点ID',
  71. `online_user` int(11) NOT NULL COMMENT '在线用户数',
  72. `log_time` int(11) NOT NULL COMMENT '记录时间',
  73. `created_at` datetime NOT NULL,
  74. `updated_at` datetime NOT NULL,
  75. PRIMARY KEY (`id`),
  76. KEY `idx_online` (`node_id`,`log_time`)
  77. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='节点在线信息';
  78. -- ----------------------------
  79. -- Table structure for `user`
  80. -- ----------------------------
  81. CREATE TABLE `user` (
  82. `id` int(11) NOT NULL AUTO_INCREMENT,
  83. `username` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '用户名',
  84. `password` varchar(64) NOT NULL DEFAULT '' COMMENT '密码',
  85. `port` int(11) NOT NULL DEFAULT '0' COMMENT 'SS端口',
  86. `passwd` varchar(16) NOT NULL DEFAULT '' COMMENT 'SS密码',
  87. `transfer_enable` bigint(20) NOT NULL DEFAULT '1073741824000' COMMENT '可用流量,单位字节,默认1TiB',
  88. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '已上传流量,单位字节',
  89. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '已下载流量,单位字节',
  90. `t` int(11) NOT NULL DEFAULT '0' COMMENT '最后使用时间',
  91. `enable` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'SS状态',
  92. `method` varchar(30) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '加密方式',
  93. `custom_method` varchar(30) DEFAULT 'aes-192-ctr' COMMENT '自定义加密方式',
  94. `protocol` varchar(30) NOT NULL DEFAULT 'auth_chain_a' COMMENT '协议',
  95. `protocol_param` varchar(255) DEFAULT '' COMMENT '协议参数',
  96. `obfs` varchar(30) NOT NULL DEFAULT 'tls1.2_ticket_auth' COMMENT '混淆',
  97. `obfs_param` varchar(255) DEFAULT '' COMMENT '混淆参数',
  98. `speed_limit_per_con` int(255) NOT NULL DEFAULT '204800' COMMENT '单连接限速,默认200M,单位KB',
  99. `speed_limit_per_user` int(255) NOT NULL DEFAULT '204800' COMMENT '单用户限速,默认200M,单位KB',
  100. `gender` tinyint(4) NOT NULL DEFAULT '1' COMMENT '性别:0-女、1-男',
  101. `wechat` varchar(30) DEFAULT '' COMMENT '微信',
  102. `qq` varchar(20) DEFAULT '' COMMENT 'QQ',
  103. `usage` tinyint(4) NOT NULL DEFAULT '4' COMMENT '用途:1-手机、2-电脑、3-路由器、4-其他',
  104. `pay_way` tinyint(4) NOT NULL DEFAULT '0' COMMENT '付费方式:0-免费、1-月付、2-半年付、3-年付',
  105. `balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
  106. `score` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
  107. `enable_time` date DEFAULT NULL COMMENT '开通日期',
  108. `expire_time` date NOT NULL DEFAULT '2099-01-01' COMMENT '过期时间',
  109. `ban_time` int(11) NOT NULL DEFAULT '0' COMMENT '封禁到期时间',
  110. `remark` text COMMENT '备注',
  111. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '等级:可定义名称',
  112. `is_admin` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否管理员:0-否、1-是',
  113. `reg_ip` varchar(20) NOT NULL DEFAULT '127.0.0.1' COMMENT '注册IP',
  114. `last_login` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次登录时间',
  115. `referral_uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人',
  116. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-禁用、0-未激活、1-正常',
  117. `created_at` datetime DEFAULT NULL,
  118. `updated_at` datetime DEFAULT NULL,
  119. PRIMARY KEY (`id`),
  120. UNIQUE KEY `port` (`port`)
  121. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  122. LOCK TABLES `user` WRITE;
  123. /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  124. INSERT INTO `user` (`id`, `username`, `password`, `port`, `passwd`, `transfer_enable`, `u`, `d`, `t`, `enable`, `method`, `custom_method`, `protocol`, `protocol_param`, `obfs`, `obfs_param`, `speed_limit_per_con`, `speed_limit_per_user`, `wechat`, `qq`, `usage`, `pay_way`, `balance`, `enable_time`, `expire_time`, `remark`, `is_admin`, `reg_ip`, `created_at`, `updated_at`)
  125. VALUES (1,'admin','e10adc3949ba59abbe56e057f20f883e',10000,'@123',1073741824000,0,0,0,1,'aes-192-ctr','aes-192-ctr','auth_chain_a','','tls1.2_ticket_auth','',204800,204800,'','',1,3,0.00,NULL,'2099-01-01',NULL,1,'127.0.0.1',NULL,NULL);
  126. /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  127. UNLOCK TABLES;
  128. -- ----------------------------
  129. -- Table structure for `level`
  130. -- ----------------------------
  131. CREATE TABLE `level` (
  132. `id` int(11) NOT NULL AUTO_INCREMENT,
  133. `level` int(11) NOT NULL DEFAULT '1' COMMENT '等级',
  134. `level_name` varchar(100) NOT NULL DEFAULT '' COMMENT '等级名称',
  135. `created_at` datetime DEFAULT NULL,
  136. `updated_at` datetime DEFAULT NULL,
  137. PRIMARY KEY (`id`)
  138. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  139. -- ----------------------------
  140. -- Records of `level`
  141. -- ----------------------------
  142. INSERT INTO `level` VALUES (1, '1', '倔强青铜', '2017-10-26 15:56:52', '2017-10-26 15:38:58');
  143. INSERT INTO `level` VALUES (2, '2', '秩序白银', '2017-10-26 15:57:30', '2017-10-26 12:37:51');
  144. INSERT INTO `level` VALUES (3, '3', '荣耀黄金', '2017-10-26 15:41:31', '2017-10-26 15:41:31');
  145. INSERT INTO `level` VALUES (4, '4', '尊贵铂金', '2017-10-26 15:41:38', '2017-10-26 15:41:38');
  146. INSERT INTO `level` VALUES (5, '5', '永恒钻石', '2017-10-26 15:41:47', '2017-10-26 15:41:47');
  147. INSERT INTO `level` VALUES (6, '6', '至尊黑曜', '2017-10-26 15:41:56', '2017-10-26 15:41:56');
  148. INSERT INTO `level` VALUES (7, '7', '最强王者', '2017-10-26 15:42:02', '2017-10-26 15:42:02');
  149. -- ----------------------------
  150. -- Table structure for `user_traffic_log`
  151. -- ----------------------------
  152. CREATE TABLE `user_traffic_log` (
  153. `id` int(11) NOT NULL AUTO_INCREMENT,
  154. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  155. `u` int(11) NOT NULL DEFAULT '0' COMMENT '上传流量',
  156. `d` int(11) NOT NULL DEFAULT '0' COMMENT '下载流量',
  157. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  158. `rate` float NOT NULL COMMENT '流量比例',
  159. `traffic` varchar(32) NOT NULL COMMENT '产生流量',
  160. `log_time` int(11) NOT NULL COMMENT '记录时间',
  161. PRIMARY KEY (`id`),
  162. KEY `idx_user` (`user_id`),
  163. KEY `idx_node` (`node_id`)
  164. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  165. -- ----------------------------
  166. -- Table structure for `ss_config`
  167. -- ----------------------------
  168. DROP TABLE IF EXISTS `ss_config`;
  169. CREATE TABLE `ss_config` (
  170. `id` int(11) NOT NULL AUTO_INCREMENT,
  171. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '配置名',
  172. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1-加密方式、2-协议、3-混淆',
  173. `is_default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否默认:0-不是、1-是',
  174. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序:值越大排越前',
  175. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  176. `updated_at` datetime DEFAULT NULL COMMENT '最后一次更新时间',
  177. PRIMARY KEY (`id`)
  178. ) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  179. -- ----------------------------
  180. -- Records of ss_config
  181. -- ----------------------------
  182. INSERT INTO `ss_config` VALUES ('1', 'none', '1', '0', '0', '2017-08-01 13:12:23', '2017-08-01 13:12:23');
  183. INSERT INTO `ss_config` VALUES ('2', 'rc4-md5', '1', '0', '0', '2017-08-01 13:12:29', '2017-08-01 13:12:29');
  184. INSERT INTO `ss_config` VALUES ('3', 'bf-cfb', '1', '0', '0', '2017-08-01 13:13:05', '2017-08-01 13:13:05');
  185. INSERT INTO `ss_config` VALUES ('4', 'aes-128-cfb', '1', '0', '0', '2017-08-01 13:13:13', '2017-08-01 13:13:13');
  186. INSERT INTO `ss_config` VALUES ('5', 'aes-192-cfb', '1', '0', '0', '2017-08-01 13:13:25', '2017-08-01 13:13:25');
  187. INSERT INTO `ss_config` VALUES ('6', 'aes-256-cfb', '1', '0', '0', '2017-08-01 13:13:39', '2017-08-01 13:13:39');
  188. INSERT INTO `ss_config` VALUES ('7', 'aes-128-ctr', '1', '0', '0', '2017-08-01 13:13:46', '2017-08-01 13:13:46');
  189. INSERT INTO `ss_config` VALUES ('8', 'aes-192-ctr', '1', '1', '0', '2017-08-01 13:13:53', '2017-08-01 13:13:53');
  190. INSERT INTO `ss_config` VALUES ('9', 'aes-256-ctr', '1', '0', '0', '2017-08-01 13:14:00', '2017-08-01 13:14:00');
  191. INSERT INTO `ss_config` VALUES ('10', 'camellia-128-cfb', '1', '0', '0', '2017-08-01 13:14:08', '2017-08-01 13:14:08');
  192. INSERT INTO `ss_config` VALUES ('11', 'camellia-192-cfb', '1', '0', '0', '2017-08-01 13:14:12', '2017-08-01 13:14:12');
  193. INSERT INTO `ss_config` VALUES ('12', 'camellia-256-cfb', '1', '0', '0', '2017-08-01 13:14:51', '2017-08-01 13:14:51');
  194. INSERT INTO `ss_config` VALUES ('13', 'salsa20', '1', '0', '0', '2017-08-01 13:15:09', '2017-08-01 13:15:09');
  195. INSERT INTO `ss_config` VALUES ('14', 'chacha20', '1', '0', '0', '2017-08-01 13:15:16', '2017-08-01 13:15:16');
  196. INSERT INTO `ss_config` VALUES ('15', 'chacha20-ietf', '1', '0', '0', '2017-08-01 13:15:27', '2017-08-01 13:15:27');
  197. INSERT INTO `ss_config` VALUES ('16', 'chacha20-ietf-poly1305', '1', '0', '0', '2017-08-01 13:15:39', '2017-08-01 13:15:39');
  198. INSERT INTO `ss_config` VALUES ('17', 'chacha20-poly1305', '1', '0', '0', '2017-08-01 13:15:46', '2017-08-01 13:15:46');
  199. INSERT INTO `ss_config` VALUES ('18', 'xchacha-ietf-poly1305', '1', '0', '0', '2017-08-01 13:21:51', '2017-08-01 13:21:51');
  200. INSERT INTO `ss_config` VALUES ('19', 'aes-128-gcm', '1', '0', '0', '2017-08-01 13:22:05', '2017-08-01 13:22:05');
  201. INSERT INTO `ss_config` VALUES ('20', 'aes-192-gcm', '1', '0', '0', '2017-08-01 13:22:12', '2017-08-01 13:22:12');
  202. INSERT INTO `ss_config` VALUES ('21', 'aes-256-gcm', '1', '0', '0', '2017-08-01 13:22:19', '2017-08-01 13:22:19');
  203. INSERT INTO `ss_config` VALUES ('22', 'sodium-aes-256-gcm', '1', '0', '0', '2017-08-01 13:22:32', '2017-08-01 13:22:32');
  204. INSERT INTO `ss_config` VALUES ('23', 'origin', '2', '0', '0', '2017-08-01 13:23:57', '2017-08-01 13:23:57');
  205. INSERT INTO `ss_config` VALUES ('24', 'auth_sha1_v4', '2', '0', '0', '2017-08-01 13:24:41', '2017-08-01 13:24:41');
  206. INSERT INTO `ss_config` VALUES ('25', 'auth_aes128_md5', '2', '0', '0', '2017-08-01 13:24:58', '2017-08-01 13:24:58');
  207. INSERT INTO `ss_config` VALUES ('26', 'auth_aes128_sha1', '2', '0', '0', '2017-08-01 13:25:11', '2017-08-01 13:25:11');
  208. INSERT INTO `ss_config` VALUES ('27', 'auth_chain_a', '2', '1', '0', '2017-08-01 13:25:24', '2017-08-01 13:25:24');
  209. INSERT INTO `ss_config` VALUES ('28', 'auth_chain_b', '2', '0', '0', '2017-08-01 14:02:31', '2017-08-01 14:02:31');
  210. INSERT INTO `ss_config` VALUES ('29', 'plain', '3', '0', '0', '2017-08-01 13:29:14', '2017-08-01 13:29:14');
  211. INSERT INTO `ss_config` VALUES ('30', 'http_simple', '3', '0', '0', '2017-08-01 13:29:30', '2017-08-01 13:29:30');
  212. INSERT INTO `ss_config` VALUES ('31', 'http_post', '3', '0', '0', '2017-08-01 13:29:38', '2017-08-01 13:29:38');
  213. INSERT INTO `ss_config` VALUES ('32', 'tls1.2_ticket_auth', '3', '1', '0', '2017-08-01 13:29:51', '2017-08-01 13:29:51');
  214. INSERT INTO `ss_config` VALUES ('33', 'tls1.2_ticket_fastauth', '3', '0', '0', '2017-08-01 14:02:19', '2017-08-01 14:02:19');
  215. -- ----------------------------
  216. -- Table structure for `config`
  217. -- ----------------------------
  218. CREATE TABLE `config` (
  219. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  220. `name` varchar(255) NOT NULL DEFAULT '' COMMENT '配置名',
  221. `value` varchar(255) NOT NULL DEFAULT '' COMMENT '配置值',
  222. PRIMARY KEY (`id`)
  223. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='系统配置';
  224. -- ----------------------------
  225. -- Records of config
  226. -- ----------------------------
  227. INSERT INTO `config` VALUES ('1', 'is_rand_port', 0);
  228. INSERT INTO `config` VALUES ('2', 'is_user_rand_port', 0);
  229. INSERT INTO `config` VALUES ('3', 'invite_num', 3);
  230. INSERT INTO `config` VALUES ('4', 'is_register', 1);
  231. INSERT INTO `config` VALUES ('5', 'is_invite_register', 1);
  232. INSERT INTO `config` VALUES ('6', 'website_name', 'SSRPanel');
  233. INSERT INTO `config` VALUES ('7', 'is_reset_password', 1);
  234. INSERT INTO `config` VALUES ('8', 'reset_password_times', 3);
  235. INSERT INTO `config` VALUES ('9', 'website_url', 'http://www.ssrpanel.com');
  236. INSERT INTO `config` VALUES ('10', 'is_active_register', 1);
  237. INSERT INTO `config` VALUES ('11', 'active_times', 3);
  238. INSERT INTO `config` VALUES ('12', 'login_add_score', 1);
  239. INSERT INTO `config` VALUES ('13', 'min_rand_score', 1);
  240. INSERT INTO `config` VALUES ('14', 'max_rand_score', 100);
  241. INSERT INTO `config` VALUES ('15', 'wechat_qrcode', '');
  242. INSERT INTO `config` VALUES ('16', 'alipay_qrcode', '');
  243. INSERT INTO `config` VALUES ('17', 'login_add_score_range', 1440);
  244. INSERT INTO `config` VALUES ('18', 'referral_traffic', 1024);
  245. INSERT INTO `config` VALUES ('19', 'referral_percent', 0.2);
  246. INSERT INTO `config` VALUES ('20', 'referral_money', 100);
  247. INSERT INTO `config` VALUES ('21', 'referral_status', 1);
  248. INSERT INTO `config` VALUES ('22', 'default_traffic', 1024);
  249. INSERT INTO `config` VALUES ('23', 'traffic_warning', 0);
  250. INSERT INTO `config` VALUES ('24', 'traffic_warning_percent', 80);
  251. INSERT INTO `config` VALUES ('25', 'expire_warning', 0);
  252. INSERT INTO `config` VALUES ('26', 'expire_days', 15);
  253. INSERT INTO `config` VALUES ('27', 'reset_traffic', 1);
  254. INSERT INTO `config` VALUES ('28', 'default_days', 7);
  255. INSERT INTO `config` VALUES ('29', 'subscribe_max', 3);
  256. INSERT INTO `config` VALUES ('30', 'min_port', 10000);
  257. INSERT INTO `config` VALUES ('31', 'max_port', 40000);
  258. INSERT INTO `config` VALUES ('32', 'is_captcha', 0);
  259. INSERT INTO `config` VALUES ('33', 'is_traffic_ban', 1);
  260. INSERT INTO `config` VALUES ('34', 'traffic_ban_value', 10);
  261. INSERT INTO `config` VALUES ('35', 'traffic_ban_time', 60);
  262. -- ----------------------------
  263. -- Table structure for `article`
  264. -- ----------------------------
  265. CREATE TABLE `article` (
  266. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  267. `title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
  268. `author` varchar(255) DEFAULT '' COMMENT '作者',
  269. `content` text COMMENT '内容',
  270. `type` tinyint(4) DEFAULT '1' COMMENT '类型:1-文章、2-公告',
  271. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
  272. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  273. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  274. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  275. PRIMARY KEY (`id`)
  276. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  277. -- ----------------------------
  278. -- Table structure for `article_log`
  279. -- ----------------------------
  280. CREATE TABLE `article_log` (
  281. `id` int(11) NOT NULL AUTO_INCREMENT,
  282. `aid` int(11) NOT NULL DEFAULT '0' COMMENT '文章ID',
  283. `lat` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '纬度',
  284. `lng` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '经度',
  285. `ip` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'IP地址',
  286. `headers` text COLLATE utf8mb4_unicode_ci COMMENT '浏览器头部信息',
  287. `nation` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '国家',
  288. `province` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '省',
  289. `city` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '市',
  290. `district` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '区',
  291. `street` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '街道',
  292. `street_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '门牌',
  293. `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '地址',
  294. `full` text COLLATE utf8mb4_unicode_ci COMMENT '地图完整请求数据',
  295. `is_pull` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否获取拉取地址信息',
  296. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未查看、1-已查看',
  297. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  298. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  299. PRIMARY KEY (`id`)
  300. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  301. -- ----------------------------
  302. -- Table structure for `invite`
  303. -- ----------------------------
  304. CREATE TABLE `invite` (
  305. `id` int(11) NOT NULL AUTO_INCREMENT,
  306. `uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人ID',
  307. `fuid` int(11) NOT NULL DEFAULT '0' COMMENT '受邀人ID',
  308. `code` char(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邀请码',
  309. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '邀请码状态:0-未使用、1-已使用、2-已过期',
  310. `dateline` datetime DEFAULT NULL COMMENT '有效期至',
  311. `created_at` datetime DEFAULT NULL,
  312. `updated_at` datetime DEFAULT NULL,
  313. PRIMARY KEY (`id`)
  314. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邀请码表';
  315. -- ----------------------------
  316. -- Table structure for `verify`
  317. -- ----------------------------
  318. CREATE TABLE `verify` (
  319. `id` int(11) NOT NULL AUTO_INCREMENT,
  320. `user_id` int(11) NOT NULL COMMENT '用户ID',
  321. `username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  322. `token` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '校验token',
  323. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  324. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  325. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  326. PRIMARY KEY (`id`)
  327. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  328. -- ----------------------------
  329. -- Table structure for `ss_group`
  330. -- ----------------------------
  331. CREATE TABLE `ss_group` (
  332. `id` int(11) NOT NULL AUTO_INCREMENT,
  333. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组名称',
  334. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '分组级别,对应账号级别',
  335. `created_at` datetime DEFAULT NULL,
  336. `updated_at` datetime DEFAULT NULL,
  337. PRIMARY KEY (`id`)
  338. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  339. -- ----------------------------
  340. -- Table structure for `ss_group_node`
  341. -- ----------------------------
  342. CREATE TABLE `ss_group_node` (
  343. `id` int(11) NOT NULL AUTO_INCREMENT,
  344. `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '分组ID',
  345. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  346. PRIMARY KEY (`id`)
  347. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分组节点关系表';
  348. -- ----------------------------
  349. -- Table structure for `goods`
  350. -- ----------------------------
  351. CREATE TABLE `goods` (
  352. `id` int(11) NOT NULL AUTO_INCREMENT,
  353. `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品名称',
  354. `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品图片地址',
  355. `traffic` bigint(20) NOT NULL DEFAULT '0' COMMENT '商品内含多少流量,单位Mib',
  356. `score` int(11) NOT NULL DEFAULT '0' COMMENT '商品价值多少积分',
  357. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '商品类型:1-流量包、2-套餐',
  358. `price` int(11) NOT NULL DEFAULT '0' COMMENT '商品售价,单位分',
  359. `desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品描述',
  360. `days` int(11) NOT NULL DEFAULT '30' COMMENT '有效期',
  361. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已删除:0-否、1-是',
  362. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-下架、1-上架',
  363. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  364. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  365. PRIMARY KEY (`id`)
  366. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品信息表';
  367. -- ----------------------------
  368. -- Table structure for `coupon`
  369. -- ----------------------------
  370. CREATE TABLE `coupon` (
  371. `id` int(11) NOT NULL AUTO_INCREMENT,
  372. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '优惠券名称',
  373. `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '优惠券LOGO',
  374. `sn` char(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '优惠券码',
  375. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1-现金优惠、2-折扣优惠',
  376. `usage` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用途:1-仅限一次性使用、2-可重复使用',
  377. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '金额,单位分',
  378. `discount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '折扣',
  379. `available_start` int(11) NOT NULL DEFAULT '0' COMMENT '有效期开始',
  380. `available_end` int(11) NOT NULL DEFAULT '0' COMMENT '有效期结束',
  381. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已删除:0-未删除、1-已删除',
  382. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  383. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  384. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  385. PRIMARY KEY (`id`)
  386. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券';
  387. -- ----------------------------
  388. -- Table structure for `coupon_log`
  389. -- ----------------------------
  390. CREATE TABLE `coupon_log` (
  391. `id` int(11) NOT NULL AUTO_INCREMENT,
  392. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  393. `goods_id` int(11) NOT NULL COMMENT '商品ID',
  394. `order_id` int(11) NOT NULL COMMENT '订单ID',
  395. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  396. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  397. PRIMARY KEY (`id`)
  398. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券使用日志';
  399. -- ----------------------------
  400. -- Table structure for `order`
  401. -- ----------------------------
  402. CREATE TABLE `order` (
  403. `oid` int(11) NOT NULL AUTO_INCREMENT,
  404. `orderId` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '订单编号',
  405. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '操作人',
  406. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  407. `totalOriginalPrice` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单原始总价',
  408. `totalPrice` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单总价',
  409. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态:-1-已关闭、0-待支付、1-已支付待确认、2-已完成',
  410. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  411. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  412. PRIMARY KEY (`oid`)
  413. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单信息表';
  414. -- ----------------------------
  415. -- Table structure for `order_goods`
  416. -- ----------------------------
  417. CREATE TABLE `order_goods` (
  418. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  419. `oid` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  420. `orderId` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
  421. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  422. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  423. `num` int(11) NOT NULL DEFAULT '0' COMMENT '商品数量',
  424. `original_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品原价',
  425. `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品实际价格',
  426. `is_expire` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已过期:0-未过期、1-已过期',
  427. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  428. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  429. PRIMARY KEY (`id`)
  430. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  431. -- ----------------------------
  432. -- Table structure for `ticket`
  433. -- ----------------------------
  434. CREATE TABLE `ticket` (
  435. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  436. `user_id` int(11) NOT NULL DEFAULT '0',
  437. `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
  438. `content` text NOT NULL COMMENT '内容',
  439. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-待处理、1-已处理未关闭、2-已关闭',
  440. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  441. PRIMARY KEY (`id`)
  442. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  443. -- ----------------------------
  444. -- Table structure for `ticket_reply`
  445. -- ----------------------------
  446. CREATE TABLE `ticket_reply` (
  447. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  448. `ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '工单ID',
  449. `user_id` int(11) NOT NULL COMMENT '回复人ID',
  450. `content` text NOT NULL COMMENT '回复内容',
  451. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  452. PRIMARY KEY (`id`)
  453. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  454. -- ----------------------------
  455. -- Table structure for `user_score_log`
  456. -- ----------------------------
  457. CREATE TABLE `user_score_log` (
  458. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  459. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '账号ID',
  460. `before` int(11) NOT NULL DEFAULT '0' COMMENT '发生前积分',
  461. `after` int(11) NOT NULL DEFAULT '0' COMMENT '发生后积分',
  462. `score` int(11) NOT NULL DEFAULT '0' COMMENT '发生积分',
  463. `desc` varchar(50) DEFAULT '' COMMENT '描述',
  464. `created_at` datetime DEFAULT NULL COMMENT '创建日期',
  465. PRIMARY KEY (`id`),
  466. KEY `idx` (`user_id`) USING BTREE
  467. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  468. -- ----------------------------
  469. -- Table structure for `user_balance_log`
  470. -- ----------------------------
  471. CREATE TABLE `user_balance_log` (
  472. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  473. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '账号ID',
  474. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  475. `before` decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '发生前余额',
  476. `after` decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '发生后余额',
  477. `balance` decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '发生金额',
  478. `desc` varchar(255) DEFAULT '' COMMENT '描述',
  479. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  480. PRIMARY KEY (`id`)
  481. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  482. -- ----------------------------
  483. -- Table structure for `referral_apply`
  484. -- ----------------------------
  485. CREATE TABLE `referral_apply` (
  486. `id` int(11) NOT NULL AUTO_INCREMENT,
  487. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  488. `before` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '操作前可提现金额',
  489. `after` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '操作后可提现金额',
  490. `amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '本次提现金额',
  491. `link_logs` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '关联返利日志ID,例如:1,3,4',
  492. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-驳回、0-待审核、1-审核通过待打款、2-已打款',
  493. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  494. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  495. PRIMARY KEY (`id`)
  496. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='提现申请';
  497. -- ----------------------------
  498. -- Table structure for `referral_log`
  499. -- ----------------------------
  500. CREATE TABLE `referral_log` (
  501. `id` int(11) NOT NULL AUTO_INCREMENT,
  502. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  503. `ref_user_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广人ID',
  504. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联订单ID',
  505. `amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '消费金额',
  506. `ref_amount` int(11) NOT NULL DEFAULT '0' COMMENT '返利金额',
  507. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未提现、1-审核中、2-已提现',
  508. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  509. `updated_at` datetime DEFAULT NULL COMMENT '最后一次更新时间',
  510. PRIMARY KEY (`id`)
  511. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='消费返利日志';
  512. -- ----------------------------
  513. -- Table structure for `email_log`
  514. -- ----------------------------
  515. CREATE TABLE `email_log` (
  516. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  517. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '接收者ID',
  518. `title` varchar(255) DEFAULT '' COMMENT '邮件标题',
  519. `content` text COMMENT '邮件内容',
  520. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-发送成功、2-发送失败',
  521. `error` text COMMENT '发送失败抛出的异常信息',
  522. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  523. PRIMARY KEY (`id`)
  524. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邮件投递记录';
  525. -- ----------------------------
  526. -- Table structure for `user_subscribe`
  527. -- ----------------------------
  528. CREATE TABLE `user_subscribe` (
  529. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  530. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  531. `code` varchar(255) DEFAULT '' COMMENT '订阅地址唯一识别码',
  532. `times` int(11) NOT NULL DEFAULT '0' COMMENT '地址请求次数',
  533. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-禁用、1-启用',
  534. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  535. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  536. PRIMARY KEY (`id`)
  537. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  538. -- ----------------------------
  539. -- Table structure for `user_subscribe_log`
  540. -- ----------------------------
  541. CREATE TABLE `user_subscribe_log` (
  542. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  543. `sid` int(11) DEFAULT NULL COMMENT '对应user_subscribe的id',
  544. `request_ip` varchar(20) DEFAULT NULL COMMENT '请求IP',
  545. `request_time` datetime DEFAULT NULL COMMENT '请求时间',
  546. `request_header` text COMMENT '请求头部信息',
  547. PRIMARY KEY (`id`)
  548. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  549. -- ----------------------------
  550. -- Table structure for `user_traffic_daily`
  551. -- ----------------------------
  552. CREATE TABLE `user_traffic_daily` (
  553. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  554. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  555. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  556. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  557. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  558. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  559. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  560. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  561. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  562. PRIMARY KEY (`id`)
  563. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  564. -- ----------------------------
  565. -- Table structure for `user_traffic_hourly`
  566. -- ----------------------------
  567. CREATE TABLE `user_traffic_hourly` (
  568. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  569. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  570. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  571. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  572. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  573. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  574. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  575. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  576. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  577. PRIMARY KEY (`id`)
  578. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  579. -- ----------------------------
  580. -- Table structure for `node_traffic_daily`
  581. -- ----------------------------
  582. CREATE TABLE `ss_node_traffic_daily` (
  583. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  584. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  585. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  586. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  587. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  588. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  589. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  590. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  591. PRIMARY KEY (`id`),
  592. KEY `idx_node_id` (`node_id`)
  593. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  594. -- ----------------------------
  595. -- Table structure for `node_traffic_hourly`
  596. -- ----------------------------
  597. CREATE TABLE `ss_node_traffic_hourly` (
  598. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  599. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  600. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  601. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  602. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  603. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  604. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  605. `updated_at` datetime DEFAULT NULL COMMENT '最后一起更新时间',
  606. PRIMARY KEY (`id`),
  607. KEY `idx_node_id` (`node_id`)
  608. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  609. -- ----------------------------
  610. -- Table structure for `user_ban_log`
  611. -- ----------------------------
  612. CREATE TABLE `user_ban_log` (
  613. `id` int(11) NOT NULL AUTO_INCREMENT,
  614. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  615. `minutes` int(11) NOT NULL DEFAULT '0' COMMENT '封禁账号市场,单位分钟',
  616. `desc` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作描述',
  617. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未处理、1-已处理',
  618. `created_at` datetime DEFAULT NULL COMMENT ' 创建时间',
  619. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  620. PRIMARY KEY (`id`)
  621. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户封禁日志';
  622. -- ----------------------------
  623. -- Table structure for `country`
  624. -- ----------------------------
  625. CREATE TABLE `country` (
  626. `id` int(11) NOT NULL AUTO_INCREMENT,
  627. `country_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  628. `country_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代码',
  629. PRIMARY KEY (`id`)
  630. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  631. -- ----------------------------
  632. -- Records of country
  633. -- ----------------------------
  634. INSERT INTO `country` VALUES ('1', '澳大利亚', 'au');
  635. INSERT INTO `country` VALUES ('2', '巴西', 'br');
  636. INSERT INTO `country` VALUES ('3', '加拿大', 'ca');
  637. INSERT INTO `country` VALUES ('4', '瑞士', 'ch');
  638. INSERT INTO `country` VALUES ('5', '中国', 'cn');
  639. INSERT INTO `country` VALUES ('6', '德国', 'de');
  640. INSERT INTO `country` VALUES ('7', '丹麦', 'dk');
  641. INSERT INTO `country` VALUES ('8', '埃及', 'eg');
  642. INSERT INTO `country` VALUES ('9', '法国', 'fr');
  643. INSERT INTO `country` VALUES ('10', '希腊', 'gr');
  644. INSERT INTO `country` VALUES ('11', '香港', 'hk');
  645. INSERT INTO `country` VALUES ('12', '印度尼西亚', 'id');
  646. INSERT INTO `country` VALUES ('13', '爱尔兰', 'ie');
  647. INSERT INTO `country` VALUES ('14', '以色列', 'il');
  648. INSERT INTO `country` VALUES ('15', '印度', 'in');
  649. INSERT INTO `country` VALUES ('16', '伊拉克', 'iq');
  650. INSERT INTO `country` VALUES ('17', '伊朗', 'ir');
  651. INSERT INTO `country` VALUES ('18', '意大利', 'it');
  652. INSERT INTO `country` VALUES ('19', '日本', 'jp');
  653. INSERT INTO `country` VALUES ('20', '韩国', 'kr');
  654. INSERT INTO `country` VALUES ('21', '墨西哥', 'mx');
  655. INSERT INTO `country` VALUES ('22', '马来西亚', 'my');
  656. INSERT INTO `country` VALUES ('23', '荷兰', 'nl');
  657. INSERT INTO `country` VALUES ('24', '挪威', 'no');
  658. INSERT INTO `country` VALUES ('25', '纽西兰', 'nz');
  659. INSERT INTO `country` VALUES ('26', '菲律宾', 'ph');
  660. INSERT INTO `country` VALUES ('27', '俄罗斯', 'ru');
  661. INSERT INTO `country` VALUES ('28', '瑞典', 'se');
  662. INSERT INTO `country` VALUES ('29', '新加坡', 'sg');
  663. INSERT INTO `country` VALUES ('30', '泰国', 'th');
  664. INSERT INTO `country` VALUES ('31', '土耳其', 'tr');
  665. INSERT INTO `country` VALUES ('32', '台湾', 'tw');
  666. INSERT INTO `country` VALUES ('33', '英国', 'uk');
  667. INSERT INTO `country` VALUES ('34', '美国', 'us');
  668. INSERT INTO `country` VALUES ('35', '越南', 'vn');
  669. INSERT INTO `country` VALUES ('36', '波兰', 'pl');
  670. INSERT INTO `country` VALUES ('37', '哈萨克斯坦', 'kz');
  671. INSERT INTO `country` VALUES ('38', '乌克兰', 'ua');
  672. INSERT INTO `country` VALUES ('39', '罗马尼亚', 'ro');
  673. INSERT INTO `country` VALUES ('40', '阿拉伯联合酋长国', 'ae');
  674. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'wepay_enabled', '0');
  675. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'alipay_enabled', '0');
  676. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'qqpay_enabled', '0');
  677. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_wepay_mchid', '');
  678. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_alipay_mchid', '');
  679. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_qqpay_mchid', '');
  680. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_wepay_token', '');
  681. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_alipay_token', '');
  682. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_qqpay_token', '');
  683. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_wepay_phone', '');
  684. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_alipay_phone', '');
  685. INSERT INTO `config` (`id`, `name`, `value`) VALUES (NULL, 'payment_qqpay_phone', '');
  686. CREATE TABLE `ssrpanel`.`user_payment` ( `id` INT NOT NULL AUTO_INCREMENT , `user_id` INT NOT NULL , `money` FLOAT NOT NULL , `status` INT NOT NULL , PRIMARY KEY (`id`), `created_at` datetime NOT NULL,
  687. `updated_at` datetime NOT NULL) ENGINE = InnoDB;
  688. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  689. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  690. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  691. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  692. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  693. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;