db.sql 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  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. PRIMARY KEY (`id`),
  62. KEY `idx_node_id` (`node_id`) USING BTREE
  63. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='节点负载信息';
  64. -- ----------------------------
  65. -- Table structure for `ss_node_online_log`
  66. -- ----------------------------
  67. CREATE TABLE `ss_node_online_log` (
  68. `id` int(11) NOT NULL AUTO_INCREMENT,
  69. `node_id` int(11) NOT NULL COMMENT '节点ID',
  70. `online_user` int(11) NOT NULL COMMENT '在线用户数',
  71. `log_time` int(11) NOT NULL COMMENT '记录时间',
  72. PRIMARY KEY (`id`),
  73. KEY `idx_node_id` (`node_id`) USING BTREE
  74. ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='节点在线信息';
  75. -- ----------------------------
  76. -- Table structure for `user`
  77. -- ----------------------------
  78. CREATE TABLE `user` (
  79. `id` int(11) NOT NULL AUTO_INCREMENT,
  80. `username` varchar(128) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '用户名',
  81. `password` varchar(64) NOT NULL DEFAULT '' COMMENT '密码',
  82. `port` int(11) NOT NULL DEFAULT '0' COMMENT 'SS端口',
  83. `passwd` varchar(16) NOT NULL DEFAULT '' COMMENT 'SS密码',
  84. `transfer_enable` bigint(20) NOT NULL DEFAULT '1073741824000' COMMENT '可用流量,单位字节,默认1TiB',
  85. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '已上传流量,单位字节',
  86. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '已下载流量,单位字节',
  87. `t` int(11) NOT NULL DEFAULT '0' COMMENT '最后使用时间',
  88. `enable` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'SS状态',
  89. `method` varchar(30) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '加密方式',
  90. `custom_method` varchar(30) DEFAULT 'aes-192-ctr' COMMENT '自定义加密方式',
  91. `protocol` varchar(30) NOT NULL DEFAULT 'auth_chain_a' COMMENT '协议',
  92. `protocol_param` varchar(255) DEFAULT '' COMMENT '协议参数',
  93. `obfs` varchar(30) NOT NULL DEFAULT 'tls1.2_ticket_auth' COMMENT '混淆',
  94. `obfs_param` varchar(255) DEFAULT '' COMMENT '混淆参数',
  95. `speed_limit_per_con` int(255) NOT NULL DEFAULT '204800' COMMENT '单连接限速,默认200M,单位KB',
  96. `speed_limit_per_user` int(255) NOT NULL DEFAULT '204800' COMMENT '单用户限速,默认200M,单位KB',
  97. `gender` tinyint(4) NOT NULL DEFAULT '1' COMMENT '性别:0-女、1-男',
  98. `wechat` varchar(30) DEFAULT '' COMMENT '微信',
  99. `qq` varchar(20) DEFAULT '' COMMENT 'QQ',
  100. `usage` tinyint(4) NOT NULL DEFAULT '4' COMMENT '用途:1-手机、2-电脑、3-路由器、4-其他',
  101. `pay_way` tinyint(4) NOT NULL DEFAULT '0' COMMENT '付费方式:0-免费、1-月付、2-半年付、3-年付',
  102. `balance` int(11) NOT NULL DEFAULT '0' COMMENT '余额,单位分',
  103. `score` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
  104. `enable_time` date DEFAULT NULL COMMENT '开通日期',
  105. `expire_time` date NOT NULL DEFAULT '2099-01-01' COMMENT '过期时间',
  106. `ban_time` int(11) NOT NULL DEFAULT '0' COMMENT '封禁到期时间',
  107. `remark` text COMMENT '备注',
  108. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '等级:可定义名称',
  109. `is_admin` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否管理员:0-否、1-是',
  110. `reg_ip` varchar(20) NOT NULL DEFAULT '127.0.0.1' COMMENT '注册IP',
  111. `last_login` int(11) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
  112. `referral_uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人',
  113. `traffic_reset_day` tinyint(4) NOT NULL DEFAULT '0' COMMENT '流量自动重置日,0表示不重置',
  114. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-禁用、0-未激活、1-正常',
  115. `remember_token` varchar(256) DEFAULT '',
  116. `created_at` datetime DEFAULT NULL,
  117. `updated_at` datetime DEFAULT NULL,
  118. PRIMARY KEY (`id`),
  119. UNIQUE KEY `port` (`port`)
  120. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  121. LOCK TABLES `user` WRITE;
  122. /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  123. 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`)
  124. 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);
  125. /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  126. UNLOCK TABLES;
  127. -- ----------------------------
  128. -- Table structure for `level`
  129. -- ----------------------------
  130. CREATE TABLE `level` (
  131. `id` int(11) NOT NULL AUTO_INCREMENT,
  132. `level` int(11) NOT NULL DEFAULT '1' COMMENT '等级',
  133. `level_name` varchar(100) NOT NULL DEFAULT '' COMMENT '等级名称',
  134. `created_at` datetime DEFAULT NULL,
  135. `updated_at` datetime DEFAULT NULL,
  136. PRIMARY KEY (`id`)
  137. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  138. -- ----------------------------
  139. -- Records of `level`
  140. -- ----------------------------
  141. INSERT INTO `level` VALUES (1, '1', '倔强青铜', '2017-10-26 15:56:52', '2017-10-26 15:38:58');
  142. INSERT INTO `level` VALUES (2, '2', '秩序白银', '2017-10-26 15:57:30', '2017-10-26 12:37:51');
  143. INSERT INTO `level` VALUES (3, '3', '荣耀黄金', '2017-10-26 15:41:31', '2017-10-26 15:41:31');
  144. INSERT INTO `level` VALUES (4, '4', '尊贵铂金', '2017-10-26 15:41:38', '2017-10-26 15:41:38');
  145. INSERT INTO `level` VALUES (5, '5', '永恒钻石', '2017-10-26 15:41:47', '2017-10-26 15:41:47');
  146. INSERT INTO `level` VALUES (6, '6', '至尊黑曜', '2017-10-26 15:41:56', '2017-10-26 15:41:56');
  147. INSERT INTO `level` VALUES (7, '7', '最强王者', '2017-10-26 15:42:02', '2017-10-26 15:42:02');
  148. -- ----------------------------
  149. -- Table structure for `user_traffic_log`
  150. -- ----------------------------
  151. CREATE TABLE `user_traffic_log` (
  152. `id` int(11) NOT NULL AUTO_INCREMENT,
  153. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  154. `u` int(11) NOT NULL DEFAULT '0' COMMENT '上传流量',
  155. `d` int(11) NOT NULL DEFAULT '0' COMMENT '下载流量',
  156. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  157. `rate` float NOT NULL COMMENT '流量比例',
  158. `traffic` varchar(32) NOT NULL COMMENT '产生流量',
  159. `log_time` int(11) NOT NULL COMMENT '记录时间',
  160. PRIMARY KEY (`id`),
  161. KEY `idx_user` (`user_id`),
  162. KEY `idx_node` (`node_id`),
  163. KEY `idx_user_node` (`user_id`,`node_id`) USING BTREE
  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. INSERT INTO `config` VALUES ('36', 'is_clear_log', 1);
  263. INSERT INTO `config` VALUES ('37', 'dmf_wepay', '0');
  264. INSERT INTO `config` VALUES ('38', 'dmf_alipay', '0');
  265. INSERT INTO `config` VALUES ('39', 'dmf_qqpay', '0');
  266. INSERT INTO `config` VALUES ('40', 'dmf_wepay_mchid', '');
  267. INSERT INTO `config` VALUES ('41', 'dmf_alipay_mchid', '');
  268. INSERT INTO `config` VALUES ('42', 'dmf_qqpay_mchid', '');
  269. INSERT INTO `config` VALUES ('43', 'dmf_wepay_token', '');
  270. INSERT INTO `config` VALUES ('44', 'dmf_alipay_token', '');
  271. INSERT INTO `config` VALUES ('45', 'dmf_qqpay_token', '');
  272. INSERT INTO `config` VALUES ('46', 'dmf_wepay_phone', '');
  273. INSERT INTO `config` VALUES ('47', 'dmf_alipay_phone', '');
  274. INSERT INTO `config` VALUES ('48', 'dmf_qqpay_phone', '');
  275. -- ----------------------------
  276. -- Table structure for `article`
  277. -- ----------------------------
  278. CREATE TABLE `article` (
  279. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  280. `title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
  281. `author` varchar(255) DEFAULT '' COMMENT '作者',
  282. `content` text COMMENT '内容',
  283. `type` tinyint(4) DEFAULT '1' COMMENT '类型:1-文章、2-公告',
  284. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
  285. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  286. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  287. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  288. PRIMARY KEY (`id`)
  289. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  290. -- ----------------------------
  291. -- Table structure for `article_log`
  292. -- ----------------------------
  293. CREATE TABLE `article_log` (
  294. `id` int(11) NOT NULL AUTO_INCREMENT,
  295. `aid` int(11) NOT NULL DEFAULT '0' COMMENT '文章ID',
  296. `lat` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '纬度',
  297. `lng` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '经度',
  298. `ip` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'IP地址',
  299. `headers` text COLLATE utf8mb4_unicode_ci COMMENT '浏览器头部信息',
  300. `nation` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '国家',
  301. `province` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '省',
  302. `city` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '市',
  303. `district` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '区',
  304. `street` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '街道',
  305. `street_number` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '门牌',
  306. `address` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '地址',
  307. `full` text COLLATE utf8mb4_unicode_ci COMMENT '地图完整请求数据',
  308. `is_pull` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否获取拉取地址信息',
  309. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未查看、1-已查看',
  310. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  311. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  312. PRIMARY KEY (`id`)
  313. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  314. -- ----------------------------
  315. -- Table structure for `invite`
  316. -- ----------------------------
  317. CREATE TABLE `invite` (
  318. `id` int(11) NOT NULL AUTO_INCREMENT,
  319. `uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人ID',
  320. `fuid` int(11) NOT NULL DEFAULT '0' COMMENT '受邀人ID',
  321. `code` char(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邀请码',
  322. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '邀请码状态:0-未使用、1-已使用、2-已过期',
  323. `dateline` datetime DEFAULT NULL COMMENT '有效期至',
  324. `created_at` datetime DEFAULT NULL,
  325. `updated_at` datetime DEFAULT NULL,
  326. PRIMARY KEY (`id`)
  327. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邀请码表';
  328. -- ----------------------------
  329. -- Table structure for `verify`
  330. -- ----------------------------
  331. CREATE TABLE `verify` (
  332. `id` int(11) NOT NULL AUTO_INCREMENT,
  333. `user_id` int(11) NOT NULL COMMENT '用户ID',
  334. `username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  335. `token` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '校验token',
  336. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  337. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  338. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  339. PRIMARY KEY (`id`)
  340. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  341. -- ----------------------------
  342. -- Table structure for `ss_group`
  343. -- ----------------------------
  344. CREATE TABLE `ss_group` (
  345. `id` int(11) NOT NULL AUTO_INCREMENT,
  346. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组名称',
  347. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '分组级别,对应账号级别',
  348. `created_at` datetime DEFAULT NULL,
  349. `updated_at` datetime DEFAULT NULL,
  350. PRIMARY KEY (`id`)
  351. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  352. -- ----------------------------
  353. -- Table structure for `ss_group_node`
  354. -- ----------------------------
  355. CREATE TABLE `ss_group_node` (
  356. `id` int(11) NOT NULL AUTO_INCREMENT,
  357. `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '分组ID',
  358. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  359. PRIMARY KEY (`id`)
  360. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分组节点关系表';
  361. -- ----------------------------
  362. -- Table structure for `goods`
  363. -- ----------------------------
  364. CREATE TABLE `goods` (
  365. `id` int(11) NOT NULL AUTO_INCREMENT,
  366. `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品名称',
  367. `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品图片地址',
  368. `traffic` bigint(20) NOT NULL DEFAULT '0' COMMENT '商品内含多少流量,单位Mib',
  369. `score` int(11) NOT NULL DEFAULT '0' COMMENT '商品价值多少积分',
  370. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '商品类型:1-流量包、2-套餐',
  371. `price` int(11) NOT NULL DEFAULT '0' COMMENT '商品售价,单位分',
  372. `desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品描述',
  373. `days` int(11) NOT NULL DEFAULT '30' COMMENT '有效期',
  374. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已删除:0-否、1-是',
  375. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-下架、1-上架',
  376. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  377. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  378. PRIMARY KEY (`id`)
  379. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品信息表';
  380. -- ----------------------------
  381. -- Table structure for `coupon`
  382. -- ----------------------------
  383. CREATE TABLE `coupon` (
  384. `id` int(11) NOT NULL AUTO_INCREMENT,
  385. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '优惠券名称',
  386. `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '优惠券LOGO',
  387. `sn` char(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '优惠券码',
  388. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1-现金优惠、2-折扣优惠',
  389. `usage` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用途:1-仅限一次性使用、2-可重复使用',
  390. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '金额,单位分',
  391. `discount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '折扣',
  392. `available_start` int(11) NOT NULL DEFAULT '0' COMMENT '有效期开始',
  393. `available_end` int(11) NOT NULL DEFAULT '0' COMMENT '有效期结束',
  394. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已删除:0-未删除、1-已删除',
  395. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  396. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  397. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  398. PRIMARY KEY (`id`)
  399. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券';
  400. -- ----------------------------
  401. -- Table structure for `coupon_log`
  402. -- ----------------------------
  403. CREATE TABLE `coupon_log` (
  404. `id` int(11) NOT NULL AUTO_INCREMENT,
  405. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  406. `goods_id` int(11) NOT NULL COMMENT '商品ID',
  407. `order_id` int(11) NOT NULL COMMENT '订单ID',
  408. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  409. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  410. PRIMARY KEY (`id`)
  411. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券使用日志';
  412. -- ----------------------------
  413. -- Table structure for `order`
  414. -- ----------------------------
  415. CREATE TABLE `order` (
  416. `oid` int(11) NOT NULL AUTO_INCREMENT,
  417. `orderId` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '订单编号',
  418. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '操作人',
  419. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  420. `totalOriginalPrice` int(11) NOT NULL DEFAULT '0' COMMENT '订单原始总价,单位分',
  421. `totalPrice` int(11) NOT NULL DEFAULT '0' COMMENT '订单总价,单位分',
  422. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态:-1-已关闭、0-待支付、1-已支付待确认、2-已完成',
  423. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  424. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  425. PRIMARY KEY (`oid`)
  426. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单信息表';
  427. -- ----------------------------
  428. -- Table structure for `order_goods`
  429. -- ----------------------------
  430. CREATE TABLE `order_goods` (
  431. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  432. `oid` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  433. `orderId` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
  434. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  435. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  436. `num` int(11) NOT NULL DEFAULT '0' COMMENT '商品数量',
  437. `original_price` int(11) NOT NULL DEFAULT '0' COMMENT '商品原价,单位分',
  438. `price` int(11) NOT NULL DEFAULT '0' COMMENT '商品实际价格,单位分',
  439. `is_expire` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已过期:0-未过期、1-已过期',
  440. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  441. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  442. PRIMARY KEY (`id`)
  443. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  444. -- ----------------------------
  445. -- Table structure for `ticket`
  446. -- ----------------------------
  447. CREATE TABLE `ticket` (
  448. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  449. `user_id` int(11) NOT NULL DEFAULT '0',
  450. `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
  451. `content` text NOT NULL COMMENT '内容',
  452. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-待处理、1-已处理未关闭、2-已关闭',
  453. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  454. PRIMARY KEY (`id`)
  455. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  456. -- ----------------------------
  457. -- Table structure for `ticket_reply`
  458. -- ----------------------------
  459. CREATE TABLE `ticket_reply` (
  460. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  461. `ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '工单ID',
  462. `user_id` int(11) NOT NULL COMMENT '回复人ID',
  463. `content` text NOT NULL COMMENT '回复内容',
  464. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  465. PRIMARY KEY (`id`)
  466. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  467. -- ----------------------------
  468. -- Table structure for `user_score_log`
  469. -- ----------------------------
  470. CREATE TABLE `user_score_log` (
  471. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  472. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '账号ID',
  473. `before` int(11) NOT NULL DEFAULT '0' COMMENT '发生前积分',
  474. `after` int(11) NOT NULL DEFAULT '0' COMMENT '发生后积分',
  475. `score` int(11) NOT NULL DEFAULT '0' COMMENT '发生积分',
  476. `desc` varchar(50) DEFAULT '' COMMENT '描述',
  477. `created_at` datetime DEFAULT NULL COMMENT '创建日期',
  478. PRIMARY KEY (`id`),
  479. KEY `idx` (`user_id`) USING BTREE
  480. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  481. -- ----------------------------
  482. -- Table structure for `user_balance_log`
  483. -- ----------------------------
  484. CREATE TABLE `user_balance_log` (
  485. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  486. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '账号ID',
  487. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  488. `before` int(11) NOT NULL DEFAULT '0' COMMENT '发生前余额,单位分',
  489. `after` int(11) NOT NULL DEFAULT '0' COMMENT '发生后金额,单位分',
  490. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '发生金额,单位分',
  491. `desc` varchar(255) DEFAULT '' COMMENT '操作描述',
  492. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  493. PRIMARY KEY (`id`)
  494. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  495. -- ----------------------------
  496. -- Table structure for `referral_apply`
  497. -- ----------------------------
  498. CREATE TABLE `referral_apply` (
  499. `id` int(11) NOT NULL AUTO_INCREMENT,
  500. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  501. `before` int(11) NOT NULL DEFAULT '0' COMMENT '操作前可提现金额,单位分',
  502. `after` int(11) NOT NULL DEFAULT '0' COMMENT '操作后可提现金额,单位分',
  503. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '本次提现金额,单位分',
  504. `link_logs` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '关联返利日志ID,例如:1,3,4',
  505. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-驳回、0-待审核、1-审核通过待打款、2-已打款',
  506. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  507. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  508. PRIMARY KEY (`id`)
  509. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='提现申请';
  510. -- ----------------------------
  511. -- Table structure for `referral_log`
  512. -- ----------------------------
  513. CREATE TABLE `referral_log` (
  514. `id` int(11) NOT NULL AUTO_INCREMENT,
  515. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  516. `ref_user_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广人ID',
  517. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联订单ID',
  518. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '消费金额,单位分',
  519. `ref_amount` int(11) NOT NULL DEFAULT '0' COMMENT '返利金额',
  520. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未提现、1-审核中、2-已提现',
  521. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  522. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  523. PRIMARY KEY (`id`)
  524. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='消费返利日志';
  525. -- ----------------------------
  526. -- Table structure for `email_log`
  527. -- ----------------------------
  528. CREATE TABLE `email_log` (
  529. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  530. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '接收者ID',
  531. `title` varchar(255) DEFAULT '' COMMENT '邮件标题',
  532. `content` text COMMENT '邮件内容',
  533. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-发送成功、2-发送失败',
  534. `error` text COMMENT '发送失败抛出的异常信息',
  535. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  536. PRIMARY KEY (`id`)
  537. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邮件投递记录';
  538. -- ----------------------------
  539. -- Table structure for `user_subscribe`
  540. -- ----------------------------
  541. CREATE TABLE `user_subscribe` (
  542. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  543. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  544. `code` varchar(255) DEFAULT '' COMMENT '订阅地址唯一识别码',
  545. `times` int(11) NOT NULL DEFAULT '0' COMMENT '地址请求次数',
  546. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-禁用、1-启用',
  547. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  548. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  549. PRIMARY KEY (`id`)
  550. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  551. -- ----------------------------
  552. -- Table structure for `user_subscribe_log`
  553. -- ----------------------------
  554. CREATE TABLE `user_subscribe_log` (
  555. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  556. `sid` int(11) DEFAULT NULL COMMENT '对应user_subscribe的id',
  557. `request_ip` varchar(20) DEFAULT NULL COMMENT '请求IP',
  558. `request_time` datetime DEFAULT NULL COMMENT '请求时间',
  559. `request_header` text COMMENT '请求头部信息',
  560. PRIMARY KEY (`id`)
  561. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  562. -- ----------------------------
  563. -- Table structure for `user_traffic_daily`
  564. -- ----------------------------
  565. CREATE TABLE `user_traffic_daily` (
  566. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  567. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  568. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  569. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  570. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  571. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  572. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  573. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  574. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  575. PRIMARY KEY (`id`),
  576. KEY `idx_user` (`user_id`) USING BTREE,
  577. KEY `idx_user_node` (`user_id`,`node_id`) USING BTREE
  578. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  579. -- ----------------------------
  580. -- Table structure for `user_traffic_hourly`
  581. -- ----------------------------
  582. CREATE TABLE `user_traffic_hourly` (
  583. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  584. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  585. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  586. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  587. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  588. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  589. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  590. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  591. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  592. PRIMARY KEY (`id`),
  593. KEY `idx_user` (`user_id`) USING BTREE,
  594. KEY `idx_user_node` (`user_id`,`node_id`) USING BTREE
  595. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  596. -- ----------------------------
  597. -- Table structure for `node_traffic_daily`
  598. -- ----------------------------
  599. CREATE TABLE `ss_node_traffic_daily` (
  600. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  601. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  602. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  603. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  604. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  605. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  606. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  607. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  608. PRIMARY KEY (`id`),
  609. KEY `idx_node_id` (`node_id`)
  610. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  611. -- ----------------------------
  612. -- Table structure for `node_traffic_hourly`
  613. -- ----------------------------
  614. CREATE TABLE `ss_node_traffic_hourly` (
  615. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  616. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  617. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  618. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  619. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  620. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  621. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  622. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  623. PRIMARY KEY (`id`),
  624. KEY `idx_node_id` (`node_id`)
  625. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
  626. -- ----------------------------
  627. -- Table structure for `user_ban_log`
  628. -- ----------------------------
  629. CREATE TABLE `user_ban_log` (
  630. `id` int(11) NOT NULL AUTO_INCREMENT,
  631. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  632. `minutes` int(11) NOT NULL DEFAULT '0' COMMENT '封禁账号时长,单位分钟',
  633. `desc` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作描述',
  634. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未处理、1-已处理',
  635. `created_at` datetime DEFAULT NULL COMMENT ' 创建时间',
  636. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  637. PRIMARY KEY (`id`)
  638. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户封禁日志';
  639. -- ----------------------------
  640. -- Table structure for `country`
  641. -- ----------------------------
  642. CREATE TABLE `country` (
  643. `id` int(11) NOT NULL AUTO_INCREMENT,
  644. `country_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  645. `country_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代码',
  646. PRIMARY KEY (`id`)
  647. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  648. -- ----------------------------
  649. -- Records of country
  650. -- ----------------------------
  651. INSERT INTO `country` VALUES ('1', '澳大利亚', 'au');
  652. INSERT INTO `country` VALUES ('2', '巴西', 'br');
  653. INSERT INTO `country` VALUES ('3', '加拿大', 'ca');
  654. INSERT INTO `country` VALUES ('4', '瑞士', 'ch');
  655. INSERT INTO `country` VALUES ('5', '中国', 'cn');
  656. INSERT INTO `country` VALUES ('6', '德国', 'de');
  657. INSERT INTO `country` VALUES ('7', '丹麦', 'dk');
  658. INSERT INTO `country` VALUES ('8', '埃及', 'eg');
  659. INSERT INTO `country` VALUES ('9', '法国', 'fr');
  660. INSERT INTO `country` VALUES ('10', '希腊', 'gr');
  661. INSERT INTO `country` VALUES ('11', '香港', 'hk');
  662. INSERT INTO `country` VALUES ('12', '印度尼西亚', 'id');
  663. INSERT INTO `country` VALUES ('13', '爱尔兰', 'ie');
  664. INSERT INTO `country` VALUES ('14', '以色列', 'il');
  665. INSERT INTO `country` VALUES ('15', '印度', 'in');
  666. INSERT INTO `country` VALUES ('16', '伊拉克', 'iq');
  667. INSERT INTO `country` VALUES ('17', '伊朗', 'ir');
  668. INSERT INTO `country` VALUES ('18', '意大利', 'it');
  669. INSERT INTO `country` VALUES ('19', '日本', 'jp');
  670. INSERT INTO `country` VALUES ('20', '韩国', 'kr');
  671. INSERT INTO `country` VALUES ('21', '墨西哥', 'mx');
  672. INSERT INTO `country` VALUES ('22', '马来西亚', 'my');
  673. INSERT INTO `country` VALUES ('23', '荷兰', 'nl');
  674. INSERT INTO `country` VALUES ('24', '挪威', 'no');
  675. INSERT INTO `country` VALUES ('25', '纽西兰', 'nz');
  676. INSERT INTO `country` VALUES ('26', '菲律宾', 'ph');
  677. INSERT INTO `country` VALUES ('27', '俄罗斯', 'ru');
  678. INSERT INTO `country` VALUES ('28', '瑞典', 'se');
  679. INSERT INTO `country` VALUES ('29', '新加坡', 'sg');
  680. INSERT INTO `country` VALUES ('30', '泰国', 'th');
  681. INSERT INTO `country` VALUES ('31', '土耳其', 'tr');
  682. INSERT INTO `country` VALUES ('32', '台湾', 'tw');
  683. INSERT INTO `country` VALUES ('33', '英国', 'uk');
  684. INSERT INTO `country` VALUES ('34', '美国', 'us');
  685. INSERT INTO `country` VALUES ('35', '越南', 'vn');
  686. INSERT INTO `country` VALUES ('36', '波兰', 'pl');
  687. INSERT INTO `country` VALUES ('37', '哈萨克斯坦', 'kz');
  688. INSERT INTO `country` VALUES ('38', '乌克兰', 'ua');
  689. INSERT INTO `country` VALUES ('39', '罗马尼亚', 'ro');
  690. INSERT INTO `country` VALUES ('40', '阿联酋', 'ae');
  691. INSERT INTO `country` VALUES ('41', '南非', 'za');
  692. INSERT INTO `country` VALUES ('42', '缅甸', 'mm');
  693. INSERT INTO `country` VALUES ('43', '冰岛', 'is');
  694. INSERT INTO `country` VALUES ('44', '芬兰', 'fi');
  695. INSERT INTO `country` VALUES ('45', '卢森堡', 'lu');
  696. INSERT INTO `country` VALUES ('46', '比利时', 'be');
  697. CREATE TABLE `payment` (
  698. `id` int(11) NOT NULL AUTO_INCREMENT,
  699. `user_id` int(11) NOT NULL,
  700. `pay_way` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付类型',
  701. `money` int(11) NOT NULL DEFAULT '0' COMMENT '充值金额,单位分',
  702. `status` int(11) NOT NULL DEFAULT '1' COMMENT '充值状态:1-成功',
  703. `created_at` datetime NOT NULL,
  704. `updated_at` datetime NOT NULL,
  705. PRIMARY KEY (`id`)
  706. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  707. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  708. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  709. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  710. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  711. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  712. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;