db.sql 43 KB

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