db.sql 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201
  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. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '服务类型:1-SS、2-V2ray',
  25. `name` VARCHAR(128) NOT NULL DEFAULT '' COMMENT '名称',
  26. `group_id` INT(11) NOT NULL DEFAULT '0' COMMENT '所属分组',
  27. `country_code` CHAR(5) NOT NULL DEFAULT 'un' COMMENT '国家代码',
  28. `server` VARCHAR(128) NULL DEFAULT '' COMMENT '服务器域名地址',
  29. `ip` CHAR(15) NULL DEFAULT '' COMMENT '服务器IPV4地址',
  30. `ipv6` CHAR(128) NULL DEFAULT '' COMMENT '服务器IPV6地址',
  31. `desc` VARCHAR(255) NULL DEFAULT '' COMMENT '节点简单描述',
  32. `method` VARCHAR(32) NOT NULL DEFAULT 'aes-192-ctr' COMMENT '加密方式',
  33. `protocol` VARCHAR(128) NOT NULL DEFAULT 'auth_chain_a' COMMENT '协议',
  34. `protocol_param` VARCHAR(128) NULL DEFAULT '' COMMENT '协议参数',
  35. `obfs` VARCHAR(128) NOT NULL DEFAULT 'tls1.2_ticket_auth' COMMENT '混淆',
  36. `obfs_param` VARCHAR(128) NULL DEFAULT '' COMMENT '混淆参数',
  37. `traffic_rate` FLOAT NOT NULL DEFAULT '1.00' COMMENT '流量比率',
  38. `bandwidth` INT(11) NOT NULL DEFAULT '100' COMMENT '出口带宽,单位M',
  39. `traffic` INT(20) NOT NULL DEFAULT '1000' COMMENT '每月可用流量,单位G',
  40. `monitor_url` VARCHAR(255) NULL DEFAULT NULL COMMENT '监控地址',
  41. `is_subscribe` TINYINT(4) NULL DEFAULT '1' COMMENT '是否允许用户订阅该节点:0-否、1-是',
  42. `is_nat` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否为NAT机:0-否、1-是',
  43. `is_udp` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '是否允许UDP:0-否、1-是',
  44. `ssh_port` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '22' COMMENT 'SSH端口',
  45. `is_tcp_check` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '是否开启检测: 0-不开启、1-开启',
  46. `compatible` TINYINT(4) NULL DEFAULT '0' COMMENT '兼容SS',
  47. `single` TINYINT(4) NULL DEFAULT '0' COMMENT '单端口多用户:0-否、1-是',
  48. `single_force` TINYINT(4) NULL DEFAULT NULL COMMENT '模式:0-兼容模式、1-严格模式',
  49. `single_port` VARCHAR(50) NULL DEFAULT '' COMMENT '端口号,用,号分隔',
  50. `single_passwd` VARCHAR(50) NULL DEFAULT '' COMMENT '密码',
  51. `single_method` VARCHAR(50) NULL DEFAULT '' COMMENT '加密方式',
  52. `single_protocol` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '协议',
  53. `single_obfs` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '混淆',
  54. `sort` INT(11) NOT NULL DEFAULT '0' COMMENT '排序值,值越大越靠前显示',
  55. `status` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '状态:0-维护、1-正常',
  56. `v2_alter_id` INT(11) NOT NULL DEFAULT '16' COMMENT 'V2ray额外ID',
  57. `v2_port` INT(11) NOT NULL DEFAULT '0' COMMENT 'V2ray端口',
  58. `v2_method` VARCHAR(32) NOT NULL DEFAULT 'aes-128-gcm' COMMENT 'V2ray加密方式',
  59. `v2_net` VARCHAR(16) NOT NULL DEFAULT 'tcp' COMMENT 'V2ray传输协议',
  60. `v2_type` VARCHAR(32) NOT NULL DEFAULT 'none' COMMENT 'V2ray伪装类型',
  61. `v2_host` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'V2ray伪装的域名',
  62. `v2_path` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'V2ray WS/H2路径',
  63. `v2_tls` TINYINT(4) NOT NULL DEFAULT '0' COMMENT 'V2ray底层传输安全 0 未开启 1 开启',
  64. `created_at` DATETIME NOT NULL,
  65. `updated_at` DATETIME NOT NULL,
  66. PRIMARY KEY (`id`),
  67. INDEX `idx_group` (`group_id`),
  68. INDEX `idx_sub` (`is_subscribe`)
  69. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='节点信息表';
  70. -- ----------------------------
  71. -- Table structure for `ss_node_info`
  72. -- ----------------------------
  73. CREATE TABLE `ss_node_info` (
  74. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  75. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  76. `uptime` int(11) NOT NULL COMMENT '在线时长',
  77. `load` varchar(64) NOT NULL COMMENT '负载',
  78. `log_time` int(11) NOT NULL COMMENT '记录时间',
  79. PRIMARY KEY (`id`),
  80. INDEX `idx_node_id` (`node_id`) USING BTREE
  81. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点负载信息';
  82. -- ----------------------------
  83. -- Table structure for `ss_node_online_log`
  84. -- ----------------------------
  85. CREATE TABLE `ss_node_online_log` (
  86. `id` int(11) NOT NULL AUTO_INCREMENT,
  87. `node_id` int(11) NOT NULL COMMENT '节点ID',
  88. `online_user` int(11) NOT NULL COMMENT '在线用户数',
  89. `log_time` int(11) NOT NULL COMMENT '记录时间',
  90. PRIMARY KEY (`id`),
  91. INDEX `idx_node_id` (`node_id`) USING BTREE
  92. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点在线信息';
  93. -- ----------------------------
  94. -- Table structure for `ss_node_label`
  95. -- ----------------------------
  96. CREATE TABLE `ss_node_label` (
  97. `id` int(11) NOT NULL AUTO_INCREMENT,
  98. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  99. `label_id` int(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
  100. PRIMARY KEY (`id`),
  101. INDEX `idx_node_label` (`node_id`,`label_id`)
  102. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点标签';
  103. -- ----------------------------
  104. -- Table structure for `user`
  105. -- ----------------------------
  106. CREATE TABLE `user` (
  107. `id` int(11) NOT NULL AUTO_INCREMENT,
  108. `username` varchar(128) NOT NULL DEFAULT '' COMMENT '用户名',
  109. `password` varchar(64) NOT NULL DEFAULT '' COMMENT '密码',
  110. `port` int(11) NOT NULL DEFAULT '0' COMMENT 'SS端口',
  111. `passwd` varchar(16) NOT NULL DEFAULT '' COMMENT 'SS密码',
  112. `vmess_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'V2ray用户ID',
  113. `transfer_enable` bigint(20) NOT NULL DEFAULT '1073741824000' COMMENT '可用流量,单位字节,默认1TiB',
  114. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '已上传流量,单位字节',
  115. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '已下载流量,单位字节',
  116. `t` int(11) NOT NULL DEFAULT '0' COMMENT '最后使用时间',
  117. `enable` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'SS状态',
  118. `method` varchar(30) NOT NULL DEFAULT 'aes-256-cfb' COMMENT '加密方式',
  119. `protocol` varchar(30) NOT NULL DEFAULT 'origin' COMMENT '协议',
  120. `protocol_param` varchar(255) DEFAULT '' COMMENT '协议参数',
  121. `obfs` varchar(30) NOT NULL DEFAULT 'plain' COMMENT '混淆',
  122. `obfs_param` varchar(255) DEFAULT '' COMMENT '混淆参数',
  123. `speed_limit_per_con` int(255) NOT NULL DEFAULT '204800' COMMENT '单连接限速,默认200M,单位KB',
  124. `speed_limit_per_user` int(255) NOT NULL DEFAULT '204800' COMMENT '单用户限速,默认200M,单位KB',
  125. `gender` tinyint(4) NOT NULL DEFAULT '1' COMMENT '性别:0-女、1-男',
  126. `wechat` varchar(30) DEFAULT '' COMMENT '微信',
  127. `qq` varchar(20) DEFAULT '' COMMENT 'QQ',
  128. `usage` VARCHAR(10) NOT NULL DEFAULT '4' COMMENT '用途:1-手机、2-电脑、3-路由器、4-其他',
  129. `pay_way` tinyint(4) NOT NULL DEFAULT '0' COMMENT '付费方式:0-免费、1-季付、2-月付、3-半年付、4-年付',
  130. `balance` int(11) NOT NULL DEFAULT '0' COMMENT '余额,单位分',
  131. `score` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
  132. `enable_time` date DEFAULT NULL COMMENT '开通日期',
  133. `expire_time` date NOT NULL DEFAULT '2099-01-01' COMMENT '过期时间',
  134. `ban_time` int(11) NOT NULL DEFAULT '0' COMMENT '封禁到期时间',
  135. `remark` text COMMENT '备注',
  136. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '等级:可定义名称',
  137. `is_admin` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否管理员:0-否、1-是',
  138. `reg_ip` varchar(20) NOT NULL DEFAULT '127.0.0.1' COMMENT '注册IP',
  139. `last_login` int(11) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
  140. `referral_uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人',
  141. `traffic_reset_day` tinyint(4) NOT NULL DEFAULT '0' COMMENT '流量自动重置日,0表示不重置',
  142. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-禁用、0-未激活、1-正常',
  143. `remember_token` varchar(256) DEFAULT '',
  144. `created_at` datetime DEFAULT NULL,
  145. `updated_at` datetime DEFAULT NULL,
  146. PRIMARY KEY (`id`),
  147. UNIQUE INDEX `unq_username` (`username`),
  148. INDEX `idx_search` (`enable`, `status`)
  149. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户';
  150. LOCK TABLES `user` WRITE;
  151. /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  152. INSERT INTO `user` (`id`, `username`, `password`, `port`, `passwd`, `vmess_id`, `transfer_enable`, `u`, `d`, `t`, `enable`, `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`, `status`, `created_at`, `updated_at`)
  153. VALUES (1,'admin','$2y$10$ryMdx5ejvCSdjvZVZAPpOuxHrsAUY8FEINUATy6RCck6j9EeHhPfq',10000,'@123', 'c6effafd-6046-7a84-376e-b0429751c304', 1099511627776,0,0,0,1,'aes-256-cfb','origin','','plain','',204800,204800,'','',1,3,0.00,'2017-01-01','2099-01-01',NULL,1,'127.0.0.1',1,now(),now());
  154. /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  155. UNLOCK TABLES;
  156. -- ----------------------------
  157. -- Table structure for `level`
  158. -- ----------------------------
  159. CREATE TABLE `level` (
  160. `id` int(11) NOT NULL AUTO_INCREMENT,
  161. `level` int(11) NOT NULL DEFAULT '1' COMMENT '等级',
  162. `level_name` varchar(100) NOT NULL DEFAULT '' COMMENT '等级名称',
  163. PRIMARY KEY (`id`)
  164. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='等级';
  165. -- ----------------------------
  166. -- Records of `level`
  167. -- ----------------------------
  168. INSERT INTO `level` VALUES (1, '1', '青铜');
  169. INSERT INTO `level` VALUES (2, '2', '白银');
  170. INSERT INTO `level` VALUES (3, '3', '黄金');
  171. INSERT INTO `level` VALUES (4, '4', '铂金');
  172. INSERT INTO `level` VALUES (5, '5', '钻石');
  173. INSERT INTO `level` VALUES (6, '6', '星耀');
  174. INSERT INTO `level` VALUES (7, '7', '王者');
  175. -- ----------------------------
  176. -- Table structure for `user_traffic_log`
  177. -- ----------------------------
  178. CREATE TABLE `user_traffic_log` (
  179. `id` int(11) NOT NULL AUTO_INCREMENT,
  180. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  181. `u` int(11) NOT NULL DEFAULT '0' COMMENT '上传流量',
  182. `d` int(11) NOT NULL DEFAULT '0' COMMENT '下载流量',
  183. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  184. `rate` float NOT NULL COMMENT '流量比例',
  185. `traffic` varchar(32) NOT NULL COMMENT '产生流量',
  186. `log_time` int(11) NOT NULL COMMENT '记录时间',
  187. PRIMARY KEY (`id`),
  188. INDEX `idx_user_node_time` (`user_id`, `node_id`, `log_time`)
  189. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户流量日志';
  190. -- ----------------------------
  191. -- Table structure for `ss_config`
  192. -- ----------------------------
  193. DROP TABLE IF EXISTS `ss_config`;
  194. CREATE TABLE `ss_config` (
  195. `id` INT(11) NOT NULL AUTO_INCREMENT,
  196. `name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '配置名' COLLATE 'utf8mb4_unicode_ci',
  197. `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:1-加密方式、2-协议、3-混淆',
  198. `is_default` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否默认:0-不是、1-是',
  199. `sort` INT(11) NOT NULL DEFAULT '0' COMMENT '排序:值越大排越前',
  200. PRIMARY KEY (`id`)
  201. ) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='通用配置';
  202. -- ----------------------------
  203. -- Records of ss_config
  204. -- ----------------------------
  205. INSERT INTO `ss_config` VALUES ('1', 'none', '1', '0', '0');
  206. INSERT INTO `ss_config` VALUES ('2', 'rc4', '1', '0', '0');
  207. INSERT INTO `ss_config` VALUES ('3', 'rc4-md5', '1', '0', '0');
  208. INSERT INTO `ss_config` VALUES ('4', 'rc4-md5-6', '1', '0', '0');
  209. INSERT INTO `ss_config` VALUES ('5', 'bf-cfb', '1', '0', '0');
  210. INSERT INTO `ss_config` VALUES ('6', 'aes-128-cfb', '1', '0', '0');
  211. INSERT INTO `ss_config` VALUES ('7', 'aes-192-cfb', '1', '0', '0');
  212. INSERT INTO `ss_config` VALUES ('8', 'aes-256-cfb', '1', '1', '0');
  213. INSERT INTO `ss_config` VALUES ('9', 'aes-128-ctr', '1', '0', '0');
  214. INSERT INTO `ss_config` VALUES ('10', 'aes-192-ctr', '1', '0', '0');
  215. INSERT INTO `ss_config` VALUES ('11', 'aes-256-ctr', '1', '0', '0');
  216. INSERT INTO `ss_config` VALUES ('12', 'camellia-128-cfb', '1', '0', '0');
  217. INSERT INTO `ss_config` VALUES ('13', 'camellia-192-cfb', '1', '0', '0');
  218. INSERT INTO `ss_config` VALUES ('14', 'camellia-256-cfb', '1', '0', '0');
  219. INSERT INTO `ss_config` VALUES ('15', 'salsa20', '1', '0', '0');
  220. INSERT INTO `ss_config` VALUES ('16', 'xsalsa20', '1', '0', '0');
  221. INSERT INTO `ss_config` VALUES ('17', 'chacha20', '1', '0', '0');
  222. INSERT INTO `ss_config` VALUES ('18', 'xchacha20', '1', '0', '0');
  223. INSERT INTO `ss_config` VALUES ('19', 'chacha20-ietf', '1', '0', '0');
  224. INSERT INTO `ss_config` VALUES ('20', 'chacha20-ietf-poly1305', '1', '0', '0');
  225. INSERT INTO `ss_config` VALUES ('21', 'chacha20-poly1305', '1', '0', '0');
  226. INSERT INTO `ss_config` VALUES ('22', 'xchacha-ietf-poly1305', '1', '0', '0');
  227. INSERT INTO `ss_config` VALUES ('23', 'aes-128-gcm', '1', '0', '0');
  228. INSERT INTO `ss_config` VALUES ('24', 'aes-192-gcm', '1', '0', '0');
  229. INSERT INTO `ss_config` VALUES ('25', 'aes-256-gcm', '1', '0', '0');
  230. INSERT INTO `ss_config` VALUES ('26', 'sodium-aes-256-gcm', '1', '0', '0');
  231. INSERT INTO `ss_config` VALUES ('27', 'origin', '2', '1', '0');
  232. INSERT INTO `ss_config` VALUES ('28', 'auth_sha1_v4', '2', '0', '0');
  233. INSERT INTO `ss_config` VALUES ('29', 'auth_aes128_md5', '2', '0', '0');
  234. INSERT INTO `ss_config` VALUES ('30', 'auth_aes128_sha1', '2', '0', '0');
  235. INSERT INTO `ss_config` VALUES ('31', 'auth_chain_a', '2', '0', '0');
  236. INSERT INTO `ss_config` VALUES ('32', 'auth_chain_b', '2', '0', '0');
  237. INSERT INTO `ss_config` VALUES ('33', 'plain', '3', '1', '0');
  238. INSERT INTO `ss_config` VALUES ('34', 'http_simple', '3', '0', '0');
  239. INSERT INTO `ss_config` VALUES ('35', 'http_post', '3', '0', '0');
  240. INSERT INTO `ss_config` VALUES ('36', 'tls1.2_ticket_auth', '3', '0', '0');
  241. INSERT INTO `ss_config` VALUES ('37', 'tls1.2_ticket_fastauth', '3', '0', '0');
  242. INSERT INTO `ss_config` VALUES ('38', 'auth_chain_c', '2', '0', '0');
  243. INSERT INTO `ss_config` VALUES ('39', 'auth_chain_d', '2', '0', '0');
  244. INSERT INTO `ss_config` VALUES ('40', 'auth_chain_e', '2', '0', '0');
  245. INSERT INTO `ss_config` VALUES ('41', 'auth_chain_f', '2', '0', '0');
  246. -- ----------------------------
  247. -- Table structure for `config`
  248. -- ----------------------------
  249. CREATE TABLE `config` (
  250. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  251. `name` varchar(255) NOT NULL DEFAULT '' COMMENT '配置名',
  252. `value` TEXT NULL COMMENT '配置值',
  253. PRIMARY KEY (`id`)
  254. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统配置';
  255. -- ----------------------------
  256. -- Records of config
  257. -- ----------------------------
  258. INSERT INTO `config` VALUES ('1', 'is_rand_port', 0);
  259. INSERT INTO `config` VALUES ('2', 'is_user_rand_port', 0);
  260. INSERT INTO `config` VALUES ('3', 'invite_num', 3);
  261. INSERT INTO `config` VALUES ('4', 'is_register', 1);
  262. INSERT INTO `config` VALUES ('5', 'is_invite_register', 2);
  263. INSERT INTO `config` VALUES ('6', 'website_name', 'SSRPanel');
  264. INSERT INTO `config` VALUES ('7', 'is_reset_password', 1);
  265. INSERT INTO `config` VALUES ('8', 'reset_password_times', 3);
  266. INSERT INTO `config` VALUES ('9', 'website_url', 'http://www.ssrpanel.com');
  267. INSERT INTO `config` VALUES ('10', 'is_active_register', 1);
  268. INSERT INTO `config` VALUES ('11', 'active_times', 3);
  269. INSERT INTO `config` VALUES ('12', 'login_add_score', 1);
  270. INSERT INTO `config` VALUES ('13', 'min_rand_score', 1);
  271. INSERT INTO `config` VALUES ('14', 'max_rand_score', 100);
  272. INSERT INTO `config` VALUES ('15', 'wechat_qrcode', '');
  273. INSERT INTO `config` VALUES ('16', 'alipay_qrcode', '');
  274. INSERT INTO `config` VALUES ('17', 'login_add_score_range', 1440);
  275. INSERT INTO `config` VALUES ('18', 'referral_traffic', 1024);
  276. INSERT INTO `config` VALUES ('19', 'referral_percent', 0.2);
  277. INSERT INTO `config` VALUES ('20', 'referral_money', 100);
  278. INSERT INTO `config` VALUES ('21', 'referral_status', 1);
  279. INSERT INTO `config` VALUES ('22', 'default_traffic', 1024);
  280. INSERT INTO `config` VALUES ('23', 'traffic_warning', 0);
  281. INSERT INTO `config` VALUES ('24', 'traffic_warning_percent', 80);
  282. INSERT INTO `config` VALUES ('25', 'expire_warning', 0);
  283. INSERT INTO `config` VALUES ('26', 'expire_days', 15);
  284. INSERT INTO `config` VALUES ('27', 'reset_traffic', 1);
  285. INSERT INTO `config` VALUES ('28', 'default_days', 7);
  286. INSERT INTO `config` VALUES ('29', 'subscribe_max', 3);
  287. INSERT INTO `config` VALUES ('30', 'min_port', 10000);
  288. INSERT INTO `config` VALUES ('31', 'max_port', 20000);
  289. INSERT INTO `config` VALUES ('32', 'is_captcha', 0);
  290. INSERT INTO `config` VALUES ('33', 'is_traffic_ban', 1);
  291. INSERT INTO `config` VALUES ('34', 'traffic_ban_value', 10);
  292. INSERT INTO `config` VALUES ('35', 'traffic_ban_time', 60);
  293. INSERT INTO `config` VALUES ('36', 'is_clear_log', 1);
  294. INSERT INTO `config` VALUES ('37', 'is_node_crash_warning', 0);
  295. INSERT INTO `config` VALUES ('38', 'crash_warning_email', '');
  296. INSERT INTO `config` VALUES ('39', 'is_server_chan', 0);
  297. INSERT INTO `config` VALUES ('40', 'server_chan_key', '');
  298. INSERT INTO `config` VALUES ('41', 'is_subscribe_ban', 1);
  299. INSERT INTO `config` VALUES ('42', 'subscribe_ban_times', 20);
  300. INSERT INTO `config` VALUES ('43', 'paypal_status', 0);
  301. INSERT INTO `config` VALUES ('44', 'paypal_client_id', '');
  302. INSERT INTO `config` VALUES ('45', 'paypal_client_secret', '');
  303. INSERT INTO `config` VALUES ('46', 'is_free_code', 0);
  304. INSERT INTO `config` VALUES ('47', 'is_forbid_robot', 0);
  305. INSERT INTO `config` VALUES ('48', 'subscribe_domain', '');
  306. INSERT INTO `config` VALUES ('49', 'auto_release_port', 1);
  307. INSERT INTO `config` VALUES ('50', 'is_youzan', 0);
  308. INSERT INTO `config` VALUES ('51', 'youzan_client_id', '');
  309. INSERT INTO `config` VALUES ('52', 'youzan_client_secret', '');
  310. INSERT INTO `config` VALUES ('53', 'kdt_id', '');
  311. INSERT INTO `config` VALUES ('54', 'initial_labels_for_user', '');
  312. INSERT INTO `config` VALUES ('55', 'website_analytics', '');
  313. INSERT INTO `config` VALUES ('56', 'website_customer_service', '');
  314. INSERT INTO `config` VALUES ('57', 'register_ip_limit', 5);
  315. INSERT INTO `config` VALUES ('58', 'goods_purchase_limit_strategy', 'none');
  316. INSERT INTO `config` VALUES ('59', 'is_push_bear', 0);
  317. INSERT INTO `config` VALUES ('60', 'push_bear_send_key', '');
  318. INSERT INTO `config` VALUES ('61', 'push_bear_qrcode', '');
  319. INSERT INTO `config` VALUES ('62', 'is_ban_status', 0);
  320. INSERT INTO `config` VALUES ('63', 'is_namesilo', 0);
  321. INSERT INTO `config` VALUES ('64', 'namesilo_key', '');
  322. INSERT INTO `config` VALUES ('65', 'website_logo', '');
  323. INSERT INTO `config` VALUES ('66', 'website_home_logo', '');
  324. INSERT INTO `config` VALUES ('67', 'is_tcp_check', 0);
  325. INSERT INTO `config` VALUES ('68', 'tcp_check_warning_times', 3);
  326. INSERT INTO `config` VALUES ('69', 'is_forbid_china', 0);
  327. INSERT INTO `config` VALUES ('70', 'is_forbid_oversea', 0);
  328. INSERT INTO `config` VALUES ('71', 'is_verify_register', 0);
  329. INSERT INTO `config` VALUES ('72', 'node_daily_report', 0);
  330. INSERT INTO `config` values ('73', 'mix_subscribe', 0);
  331. INSERT INTO `config` values ('74', 'rand_subscribe', 0);
  332. INSERT INTO `config` values ('75', 'is_custom_subscribe', 0);
  333. INSERT INTO `config` values ('76', 'is_alipay', 0);
  334. INSERT INTO `config` VALUES ('77', 'alipay_sign_type', 'MD5');
  335. INSERT INTO `config` VALUES ('78', 'alipay_partner', '');
  336. INSERT INTO `config` VALUES ('79', 'alipay_key', '');
  337. INSERT INTO `config` VALUES ('80', 'alipay_private_key', '');
  338. INSERT INTO `config` VALUES ('81', 'alipay_public_key', '');
  339. INSERT INTO `config` VALUES ('82', 'alipay_transport', 'http');
  340. INSERT INTO `config` VALUES ('83', 'alipay_currency', 'USD');
  341. -- ----------------------------
  342. -- Table structure for `article`
  343. -- ----------------------------
  344. CREATE TABLE `article` (
  345. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  346. `title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
  347. `author` varchar(50) DEFAULT '' COMMENT '作者',
  348. `summary` varchar(255) DEFAULT '' COMMENT '简介',
  349. `logo` varchar(255) DEFAULT '' COMMENT 'LOGO',
  350. `content` text COMMENT '内容',
  351. `type` tinyint(4) DEFAULT '1' COMMENT '类型:1-文章、2-公告',
  352. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
  353. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  354. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  355. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  356. PRIMARY KEY (`id`)
  357. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='文章';
  358. -- ----------------------------
  359. -- Table structure for `invite`
  360. -- ----------------------------
  361. CREATE TABLE `invite` (
  362. `id` int(11) NOT NULL AUTO_INCREMENT,
  363. `uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人ID',
  364. `fuid` int(11) NOT NULL DEFAULT '0' COMMENT '受邀人ID',
  365. `code` char(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邀请码',
  366. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '邀请码状态:0-未使用、1-已使用、2-已过期',
  367. `dateline` datetime DEFAULT NULL COMMENT '有效期至',
  368. `created_at` datetime DEFAULT NULL,
  369. `updated_at` datetime DEFAULT NULL,
  370. PRIMARY KEY (`id`)
  371. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邀请码表';
  372. -- ----------------------------
  373. -- Table structure for `label`
  374. -- ----------------------------
  375. CREATE TABLE `label` (
  376. `id` int(11) NOT NULL AUTO_INCREMENT,
  377. `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  378. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序值',
  379. PRIMARY KEY (`id`)
  380. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='标签';
  381. -- ----------------------------
  382. -- Records of label
  383. -- ----------------------------
  384. INSERT INTO `label` VALUES ('1', '电信', '0');
  385. INSERT INTO `label` VALUES ('2', '联通', '0');
  386. INSERT INTO `label` VALUES ('3', '移动', '0');
  387. INSERT INTO `label` VALUES ('4', '教育网', '0');
  388. INSERT INTO `label` VALUES ('5', '其他网络', '0');
  389. INSERT INTO `label` VALUES ('6', '免费体验', '0');
  390. -- ----------------------------
  391. -- Table structure for `verify`
  392. -- ----------------------------
  393. CREATE TABLE `verify` (
  394. `id` int(11) NOT NULL AUTO_INCREMENT,
  395. `type` TINYINT NOT NULL DEFAULT '1' COMMENT '激活类型:1-自行激活、2-管理员激活',
  396. `user_id` int(11) NOT NULL COMMENT '用户ID',
  397. `token` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '校验token',
  398. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  399. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  400. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  401. PRIMARY KEY (`id`)
  402. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='账号激活邮件地址';
  403. -- ----------------------------
  404. -- Table structure for `verify_code`
  405. -- ----------------------------
  406. CREATE TABLE `verify_code` (
  407. `id` int(11) NOT NULL AUTO_INCREMENT,
  408. `username` varchar(128) NOT NULL COMMENT '用户邮箱',
  409. `code` char(6) NOT NULL COMMENT '验证码',
  410. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  411. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  412. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  413. PRIMARY KEY (`id`)
  414. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='注册激活验证码';
  415. -- ----------------------------
  416. -- Table structure for `ss_group`
  417. -- ----------------------------
  418. CREATE TABLE `ss_group` (
  419. `id` int(11) NOT NULL AUTO_INCREMENT,
  420. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组名称',
  421. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '分组级别',
  422. `created_at` datetime DEFAULT NULL,
  423. `updated_at` datetime DEFAULT NULL,
  424. PRIMARY KEY (`id`)
  425. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点分组';
  426. -- ----------------------------
  427. -- Table structure for `ss_group_node`
  428. -- ----------------------------
  429. CREATE TABLE `ss_group_node` (
  430. `id` int(11) NOT NULL AUTO_INCREMENT,
  431. `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '分组ID',
  432. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  433. PRIMARY KEY (`id`)
  434. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分组节点关系表';
  435. -- ----------------------------
  436. -- Table structure for `goods`
  437. -- ----------------------------
  438. CREATE TABLE `goods` (
  439. `id` int(11) NOT NULL AUTO_INCREMENT,
  440. `sku` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品服务SKU',
  441. `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品名称',
  442. `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '商品图片地址',
  443. `traffic` bigint(20) NOT NULL DEFAULT '0' COMMENT '商品内含多少流量,单位Mib',
  444. `score` int(11) NOT NULL DEFAULT '0' COMMENT '商品价值多少积分',
  445. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '商品类型:1-流量包、2-套餐、3-余额充值',
  446. `price` int(11) NOT NULL DEFAULT '0' COMMENT '商品售价,单位分',
  447. `desc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '商品描述',
  448. `days` int(11) NOT NULL DEFAULT '30' COMMENT '有效期',
  449. `color` VARCHAR(50) NOT NULL DEFAULT 'green' COMMENT '商品颜色',
  450. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  451. `is_limit` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否限购:0-否、1-是',
  452. `is_hot` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否热销:0-否、1-是',
  453. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已删除:0-否、1-是',
  454. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-下架、1-上架',
  455. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  456. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  457. PRIMARY KEY (`id`)
  458. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品';
  459. -- ----------------------------
  460. -- Table structure for `coupon`
  461. -- ----------------------------
  462. CREATE TABLE `coupon` (
  463. `id` int(11) NOT NULL AUTO_INCREMENT,
  464. `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '优惠券名称',
  465. `logo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '优惠券LOGO',
  466. `sn` char(8) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '优惠券码',
  467. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1-现金券、2-折扣券、3-充值券',
  468. `usage` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用途:1-仅限一次性使用、2-可重复使用',
  469. `amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '金额,单位分',
  470. `discount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '折扣',
  471. `available_start` int(11) NOT NULL DEFAULT '0' COMMENT '有效期开始',
  472. `available_end` int(11) NOT NULL DEFAULT '0' COMMENT '有效期结束',
  473. `is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已删除:0-未删除、1-已删除',
  474. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  475. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  476. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  477. PRIMARY KEY (`id`)
  478. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券';
  479. -- ----------------------------
  480. -- Table structure for `coupon_log`
  481. -- ----------------------------
  482. CREATE TABLE `coupon_log` (
  483. `id` int(11) NOT NULL AUTO_INCREMENT,
  484. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  485. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  486. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  487. `desc` varchar(50) NOT NULL DEFAULT '' COMMENT '备注',
  488. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  489. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  490. PRIMARY KEY (`id`)
  491. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券使用日志';
  492. -- ----------------------------
  493. -- Table structure for `order`
  494. -- ----------------------------
  495. CREATE TABLE `order` (
  496. `oid` int(11) NOT NULL AUTO_INCREMENT,
  497. `order_sn` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '订单编号',
  498. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '操作人',
  499. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  500. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  501. `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  502. `origin_amount` int(11) NOT NULL DEFAULT '0' COMMENT '订单原始总价,单位分',
  503. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '订单总价,单位分',
  504. `expire_at` datetime DEFAULT NULL COMMENT '过期时间',
  505. `is_expire` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已过期:0-未过期、1-已过期',
  506. `pay_way` tinyint(4) NOT NULL DEFAULT '1' COMMENT '支付方式:1-余额支付、2-有赞云支付',
  507. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态:-1-已关闭、0-待支付、1-已支付待确认、2-已完成',
  508. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  509. `updated_at` datetime DEFAULT NULL COMMENT '最后一次更新时间',
  510. PRIMARY KEY (`oid`),
  511. INDEX `idx_order_search` (`user_id`, `goods_id`, `is_expire`, `status`)
  512. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单';
  513. -- ----------------------------
  514. -- Table structure for `order_goods`
  515. -- ----------------------------
  516. CREATE TABLE `order_goods` (
  517. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  518. `oid` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  519. `order_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
  520. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  521. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  522. `num` int(11) NOT NULL DEFAULT '0' COMMENT '商品数量',
  523. `origin_price` int(11) NOT NULL DEFAULT '0' COMMENT '商品原价,单位分',
  524. `price` int(11) NOT NULL DEFAULT '0' COMMENT '商品实际价格,单位分',
  525. `is_expire` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已过期:0-未过期、1-已过期',
  526. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  527. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  528. PRIMARY KEY (`id`)
  529. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单商品';
  530. -- ----------------------------
  531. -- Table structure for `ticket`
  532. -- ----------------------------
  533. CREATE TABLE `ticket` (
  534. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  535. `user_id` int(11) NOT NULL DEFAULT '0',
  536. `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
  537. `content` text NOT NULL COMMENT '内容',
  538. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-待处理、1-已处理未关闭、2-已关闭',
  539. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  540. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  541. PRIMARY KEY (`id`)
  542. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工单';
  543. -- ----------------------------
  544. -- Table structure for `ticket_reply`
  545. -- ----------------------------
  546. CREATE TABLE `ticket_reply` (
  547. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  548. `ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '工单ID',
  549. `user_id` int(11) NOT NULL COMMENT '回复人ID',
  550. `content` text NOT NULL COMMENT '回复内容',
  551. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  552. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  553. PRIMARY KEY (`id`)
  554. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工单回复';
  555. -- ----------------------------
  556. -- Table structure for `user_score_log`
  557. -- ----------------------------
  558. CREATE TABLE `user_score_log` (
  559. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  560. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '账号ID',
  561. `before` int(11) NOT NULL DEFAULT '0' COMMENT '发生前积分',
  562. `after` int(11) NOT NULL DEFAULT '0' COMMENT '发生后积分',
  563. `score` int(11) NOT NULL DEFAULT '0' COMMENT '发生积分',
  564. `desc` varchar(50) DEFAULT '' COMMENT '描述',
  565. `created_at` datetime DEFAULT NULL COMMENT '创建日期',
  566. PRIMARY KEY (`id`),
  567. INDEX `idx` (`user_id`) USING BTREE
  568. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户积分变动日志';
  569. -- ----------------------------
  570. -- Table structure for `user_balance_log`
  571. -- ----------------------------
  572. CREATE TABLE `user_balance_log` (
  573. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  574. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '账号ID',
  575. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  576. `before` int(11) NOT NULL DEFAULT '0' COMMENT '发生前余额,单位分',
  577. `after` int(11) NOT NULL DEFAULT '0' COMMENT '发生后金额,单位分',
  578. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '发生金额,单位分',
  579. `desc` varchar(255) DEFAULT '' COMMENT '操作描述',
  580. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  581. PRIMARY KEY (`id`)
  582. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户余额变动日志';
  583. -- ----------------------------
  584. -- Table structure for `user_traffic_modify_log`
  585. -- ----------------------------
  586. CREATE TABLE `user_traffic_modify_log` (
  587. `id` INT(11) NOT NULL AUTO_INCREMENT,
  588. `user_id` INT(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  589. `order_id` INT(11) NOT NULL DEFAULT '0' COMMENT '发生的订单ID',
  590. `before` BIGINT(20) NOT NULL DEFAULT '0' COMMENT '操作前流量',
  591. `after` BIGINT(20) NOT NULL DEFAULT '0' COMMENT '操作后流量',
  592. `desc` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '描述',
  593. `created_at` DATETIME NOT NULL,
  594. `updated_at` DATETIME NOT NULL,
  595. PRIMARY KEY (`id`)
  596. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户流量变动日志';
  597. -- ----------------------------
  598. -- Table structure for `referral_apply`
  599. -- ----------------------------
  600. CREATE TABLE `referral_apply` (
  601. `id` int(11) NOT NULL AUTO_INCREMENT,
  602. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  603. `before` int(11) NOT NULL DEFAULT '0' COMMENT '操作前可提现金额,单位分',
  604. `after` int(11) NOT NULL DEFAULT '0' COMMENT '操作后可提现金额,单位分',
  605. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '本次提现金额,单位分',
  606. `link_logs` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '关联返利日志ID,例如:1,3,4',
  607. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-驳回、0-待审核、1-审核通过待打款、2-已打款',
  608. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  609. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  610. PRIMARY KEY (`id`)
  611. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='提现申请';
  612. -- ----------------------------
  613. -- Table structure for `referral_log`
  614. -- ----------------------------
  615. CREATE TABLE `referral_log` (
  616. `id` int(11) NOT NULL AUTO_INCREMENT,
  617. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  618. `ref_user_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广人ID',
  619. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联订单ID',
  620. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '消费金额,单位分',
  621. `ref_amount` int(11) NOT NULL DEFAULT '0' COMMENT '返利金额',
  622. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未提现、1-审核中、2-已提现',
  623. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  624. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  625. PRIMARY KEY (`id`)
  626. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='消费返利日志';
  627. -- ----------------------------
  628. -- Table structure for `email_log`
  629. -- ----------------------------
  630. CREATE TABLE `email_log` (
  631. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  632. `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:1-邮件、2-serverChan',
  633. `address` VARCHAR(255) NOT NULL COMMENT '收信地址',
  634. `title` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '标题',
  635. `content` TEXT NOT NULL COMMENT '内容',
  636. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:1-发送成功、2-发送失败',
  637. `error` text COMMENT '发送失败抛出的异常信息',
  638. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  639. PRIMARY KEY (`id`)
  640. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邮件投递记录';
  641. -- ----------------------------
  642. -- Table structure for `sensitive_words`
  643. -- ----------------------------
  644. CREATE TABLE `sensitive_words` (
  645. `id` INT(11) NOT NULL AUTO_INCREMENT,
  646. `words` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '敏感词',
  647. PRIMARY KEY (`id`)
  648. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='敏感词';
  649. -- ----------------------------
  650. -- Records of label
  651. -- ----------------------------
  652. INSERT INTO `sensitive_words` (`words`) VALUES ('chacuo.com');
  653. INSERT INTO `sensitive_words` (`words`) VALUES ('chacuo.net');
  654. INSERT INTO `sensitive_words` (`words`) VALUES ('1766258.com');
  655. INSERT INTO `sensitive_words` (`words`) VALUES ('3202.com');
  656. INSERT INTO `sensitive_words` (`words`) VALUES ('4057.com');
  657. INSERT INTO `sensitive_words` (`words`) VALUES ('4059.com');
  658. INSERT INTO `sensitive_words` (`words`) VALUES ('a7996.com');
  659. INSERT INTO `sensitive_words` (`words`) VALUES ('bccto.me');
  660. INSERT INTO `sensitive_words` (`words`) VALUES ('bnuis.com');
  661. INSERT INTO `sensitive_words` (`words`) VALUES ('chaichuang.com');
  662. INSERT INTO `sensitive_words` (`words`) VALUES ('cr219.com');
  663. INSERT INTO `sensitive_words` (`words`) VALUES ('cuirushi.org');
  664. INSERT INTO `sensitive_words` (`words`) VALUES ('dawin.com');
  665. INSERT INTO `sensitive_words` (`words`) VALUES ('jiaxin8736.com');
  666. INSERT INTO `sensitive_words` (`words`) VALUES ('lakqs.com');
  667. INSERT INTO `sensitive_words` (`words`) VALUES ('urltc.com');
  668. INSERT INTO `sensitive_words` (`words`) VALUES ('027168.com');
  669. INSERT INTO `sensitive_words` (`words`) VALUES ('10minutemail.net');
  670. INSERT INTO `sensitive_words` (`words`) VALUES ('11163.com');
  671. INSERT INTO `sensitive_words` (`words`) VALUES ('1shivom.com');
  672. INSERT INTO `sensitive_words` (`words`) VALUES ('auoie.com');
  673. INSERT INTO `sensitive_words` (`words`) VALUES ('bareed.ws');
  674. INSERT INTO `sensitive_words` (`words`) VALUES ('bit-degree.com');
  675. INSERT INTO `sensitive_words` (`words`) VALUES ('cjpeg.com');
  676. INSERT INTO `sensitive_words` (`words`) VALUES ('cool.fr.nf');
  677. INSERT INTO `sensitive_words` (`words`) VALUES ('courriel.fr.nf');
  678. INSERT INTO `sensitive_words` (`words`) VALUES ('disbox.net');
  679. INSERT INTO `sensitive_words` (`words`) VALUES ('disbox.org');
  680. INSERT INTO `sensitive_words` (`words`) VALUES ('fidelium10.com');
  681. INSERT INTO `sensitive_words` (`words`) VALUES ('get365.pw');
  682. INSERT INTO `sensitive_words` (`words`) VALUES ('ggr.la');
  683. INSERT INTO `sensitive_words` (`words`) VALUES ('grr.la');
  684. INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.biz');
  685. INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.com');
  686. INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.de');
  687. INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.net');
  688. INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamail.org');
  689. INSERT INTO `sensitive_words` (`words`) VALUES ('guerrillamailblock.com');
  690. INSERT INTO `sensitive_words` (`words`) VALUES ('hubii-network.com');
  691. INSERT INTO `sensitive_words` (`words`) VALUES ('hurify1.com');
  692. INSERT INTO `sensitive_words` (`words`) VALUES ('itoup.com');
  693. INSERT INTO `sensitive_words` (`words`) VALUES ('jetable.fr.nf');
  694. INSERT INTO `sensitive_words` (`words`) VALUES ('jnpayy.com');
  695. INSERT INTO `sensitive_words` (`words`) VALUES ('juyouxi.com');
  696. INSERT INTO `sensitive_words` (`words`) VALUES ('mail.bccto.me');
  697. INSERT INTO `sensitive_words` (`words`) VALUES ('www.bccto.me');
  698. INSERT INTO `sensitive_words` (`words`) VALUES ('mega.zik.dj');
  699. INSERT INTO `sensitive_words` (`words`) VALUES ('moakt.co');
  700. INSERT INTO `sensitive_words` (`words`) VALUES ('moakt.ws');
  701. INSERT INTO `sensitive_words` (`words`) VALUES ('molms.com');
  702. INSERT INTO `sensitive_words` (`words`) VALUES ('moncourrier.fr.nf');
  703. INSERT INTO `sensitive_words` (`words`) VALUES ('monemail.fr.nf');
  704. INSERT INTO `sensitive_words` (`words`) VALUES ('monmail.fr.nf');
  705. INSERT INTO `sensitive_words` (`words`) VALUES ('nomail.xl.cx');
  706. INSERT INTO `sensitive_words` (`words`) VALUES ('nospam.ze.tc');
  707. INSERT INTO `sensitive_words` (`words`) VALUES ('pay-mon.com');
  708. INSERT INTO `sensitive_words` (`words`) VALUES ('poly-swarm.com');
  709. INSERT INTO `sensitive_words` (`words`) VALUES ('sgmh.online');
  710. INSERT INTO `sensitive_words` (`words`) VALUES ('sharklasers.com');
  711. INSERT INTO `sensitive_words` (`words`) VALUES ('shiftrpg.com');
  712. INSERT INTO `sensitive_words` (`words`) VALUES ('spam4.me');
  713. INSERT INTO `sensitive_words` (`words`) VALUES ('speed.1s.fr');
  714. INSERT INTO `sensitive_words` (`words`) VALUES ('tmail.ws');
  715. INSERT INTO `sensitive_words` (`words`) VALUES ('tmails.net');
  716. INSERT INTO `sensitive_words` (`words`) VALUES ('tmpmail.net');
  717. INSERT INTO `sensitive_words` (`words`) VALUES ('tmpmail.org');
  718. INSERT INTO `sensitive_words` (`words`) VALUES ('travala10.com');
  719. INSERT INTO `sensitive_words` (`words`) VALUES ('yopmail.com');
  720. INSERT INTO `sensitive_words` (`words`) VALUES ('yopmail.fr');
  721. INSERT INTO `sensitive_words` (`words`) VALUES ('yopmail.net');
  722. INSERT INTO `sensitive_words` (`words`) VALUES ('yuoia.com');
  723. INSERT INTO `sensitive_words` (`words`) VALUES ('zep-hyr.com');
  724. INSERT INTO `sensitive_words` (`words`) VALUES ('zippiex.com');
  725. INSERT INTO `sensitive_words` (`words`) VALUES ('lrc8.com');
  726. INSERT INTO `sensitive_words` (`words`) VALUES ('1otc.com');
  727. INSERT INTO `sensitive_words` (`words`) VALUES ('emailna.co');
  728. INSERT INTO `sensitive_words` (`words`) VALUES ('mailinator.com');
  729. INSERT INTO `sensitive_words` (`words`) VALUES ('nbzmr.com');
  730. INSERT INTO `sensitive_words` (`words`) VALUES ('awsoo.com');
  731. INSERT INTO `sensitive_words` (`words`) VALUES ('zhcne.com');
  732. INSERT INTO `sensitive_words` (`words`) VALUES ('0box.eu');
  733. INSERT INTO `sensitive_words` (`words`) VALUES ('contbay.com');
  734. INSERT INTO `sensitive_words` (`words`) VALUES ('damnthespam.com');
  735. INSERT INTO `sensitive_words` (`words`) VALUES ('kurzepost.de');
  736. INSERT INTO `sensitive_words` (`words`) VALUES ('objectmail.com');
  737. INSERT INTO `sensitive_words` (`words`) VALUES ('proxymail.eu');
  738. INSERT INTO `sensitive_words` (`words`) VALUES ('rcpt.at');
  739. INSERT INTO `sensitive_words` (`words`) VALUES ('trash-mail.at');
  740. INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.at');
  741. INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.com');
  742. INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.io');
  743. INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.me');
  744. INSERT INTO `sensitive_words` (`words`) VALUES ('trashmail.net');
  745. INSERT INTO `sensitive_words` (`words`) VALUES ('wegwerfmail.de');
  746. INSERT INTO `sensitive_words` (`words`) VALUES ('wegwerfmail.net');
  747. INSERT INTO `sensitive_words` (`words`) VALUES ('wegwerfmail.org');
  748. INSERT INTO `sensitive_words` (`words`) VALUES ('nwytg.net');
  749. INSERT INTO `sensitive_words` (`words`) VALUES ('despam.it');
  750. INSERT INTO `sensitive_words` (`words`) VALUES ('spambox.us');
  751. INSERT INTO `sensitive_words` (`words`) VALUES ('spam.la');
  752. INSERT INTO `sensitive_words` (`words`) VALUES ('mytrashmail.com');
  753. INSERT INTO `sensitive_words` (`words`) VALUES ('mt2014.com');
  754. INSERT INTO `sensitive_words` (`words`) VALUES ('mt2015.com');
  755. INSERT INTO `sensitive_words` (`words`) VALUES ('thankyou2010.com');
  756. INSERT INTO `sensitive_words` (`words`) VALUES ('trash2009.com');
  757. INSERT INTO `sensitive_words` (`words`) VALUES ('mt2009.com');
  758. INSERT INTO `sensitive_words` (`words`) VALUES ('trashymail.com');
  759. INSERT INTO `sensitive_words` (`words`) VALUES ('tempemail.net');
  760. INSERT INTO `sensitive_words` (`words`) VALUES ('slopsbox.com');
  761. INSERT INTO `sensitive_words` (`words`) VALUES ('mailnesia.com');
  762. -- ----------------------------
  763. -- Table structure for `user_subscribe`
  764. -- ----------------------------
  765. CREATE TABLE `user_subscribe` (
  766. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  767. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  768. `code` char(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '订阅地址唯一识别码',
  769. `times` int(11) NOT NULL DEFAULT '0' COMMENT '地址请求次数',
  770. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-禁用、1-启用',
  771. `ban_time` int(11) NOT NULL DEFAULT '0' COMMENT '封禁时间',
  772. `ban_desc` varchar(50) NOT NULL DEFAULT '' COMMENT '封禁理由',
  773. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  774. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  775. PRIMARY KEY (`id`)
  776. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户订阅';
  777. -- ----------------------------
  778. -- Records of `user_subscribe`
  779. -- ----------------------------
  780. INSERT INTO `user_subscribe` (`id`, `user_id`, `code`) VALUES ('1', '1', 'SsXa1');
  781. -- ----------------------------
  782. -- Table structure for `user_subscribe_log`
  783. -- ----------------------------
  784. CREATE TABLE `user_subscribe_log` (
  785. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  786. `sid` int(11) DEFAULT NULL COMMENT '对应user_subscribe的id',
  787. `request_ip` varchar(20) DEFAULT NULL COMMENT '请求IP',
  788. `request_time` datetime DEFAULT NULL COMMENT '请求时间',
  789. `request_header` text COMMENT '请求头部信息',
  790. PRIMARY KEY (`id`)
  791. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户订阅访问日志';
  792. -- ----------------------------
  793. -- Table structure for `user_traffic_daily`
  794. -- ----------------------------
  795. CREATE TABLE `user_traffic_daily` (
  796. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  797. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  798. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  799. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  800. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  801. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  802. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  803. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  804. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  805. PRIMARY KEY (`id`),
  806. INDEX `idx_user_node` (`user_id`,`node_id`) USING BTREE
  807. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户每日流量统计';
  808. -- ----------------------------
  809. -- Table structure for `user_traffic_hourly`
  810. -- ----------------------------
  811. CREATE TABLE `user_traffic_hourly` (
  812. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  813. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  814. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  815. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  816. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  817. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  818. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  819. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  820. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  821. PRIMARY KEY (`id`),
  822. INDEX `idx_user_node` (`user_id`,`node_id`) USING BTREE
  823. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户每小时流量统计';
  824. -- ----------------------------
  825. -- Table structure for `node_traffic_daily`
  826. -- ----------------------------
  827. CREATE TABLE `ss_node_traffic_daily` (
  828. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  829. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  830. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  831. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  832. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  833. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  834. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  835. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  836. PRIMARY KEY (`id`),
  837. INDEX `idx_node_id` (`node_id`)
  838. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点每日流量统计';
  839. -- ----------------------------
  840. -- Table structure for `node_traffic_hourly`
  841. -- ----------------------------
  842. CREATE TABLE `ss_node_traffic_hourly` (
  843. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  844. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  845. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  846. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  847. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  848. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  849. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  850. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  851. PRIMARY KEY (`id`),
  852. INDEX `idx_node_id` (`node_id`)
  853. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点每小时流量统计';
  854. -- ----------------------------
  855. -- Table structure for `user_ban_log`
  856. -- ----------------------------
  857. CREATE TABLE `user_ban_log` (
  858. `id` int(11) NOT NULL AUTO_INCREMENT,
  859. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  860. `minutes` int(11) NOT NULL DEFAULT '0' COMMENT '封禁账号时长,单位分钟',
  861. `desc` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '操作描述',
  862. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未处理、1-已处理',
  863. `created_at` datetime DEFAULT NULL COMMENT ' 创建时间',
  864. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  865. PRIMARY KEY (`id`)
  866. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户封禁日志';
  867. -- ----------------------------
  868. -- Table structure for `user_label`
  869. -- ----------------------------
  870. CREATE TABLE `user_label` (
  871. `id` int(11) NOT NULL AUTO_INCREMENT,
  872. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  873. `label_id` int(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
  874. PRIMARY KEY (`id`),
  875. INDEX `idx_user_label` (`user_id`,`label_id`)
  876. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户标签';
  877. -- ----------------------------
  878. -- Table structure for `goods_label`
  879. -- ----------------------------
  880. CREATE TABLE `goods_label` (
  881. `id` INT(11) NOT NULL AUTO_INCREMENT,
  882. `goods_id` INT(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  883. `label_id` INT(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
  884. PRIMARY KEY (`id`),
  885. INDEX `idx_goods_label` (`goods_id`, `label_id`)
  886. ) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品标签';
  887. -- ----------------------------
  888. -- Table structure for `country`
  889. -- ----------------------------
  890. CREATE TABLE `country` (
  891. `id` int(11) NOT NULL AUTO_INCREMENT,
  892. `country_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  893. `country_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '代码',
  894. PRIMARY KEY (`id`)
  895. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='国家代码';
  896. -- ----------------------------
  897. -- Records of `country`
  898. -- ----------------------------
  899. INSERT INTO `country` VALUES ('1', '澳大利亚', 'au');
  900. INSERT INTO `country` VALUES ('2', '巴西', 'br');
  901. INSERT INTO `country` VALUES ('3', '加拿大', 'ca');
  902. INSERT INTO `country` VALUES ('4', '瑞士', 'ch');
  903. INSERT INTO `country` VALUES ('5', '中国', 'cn');
  904. INSERT INTO `country` VALUES ('6', '德国', 'de');
  905. INSERT INTO `country` VALUES ('7', '丹麦', 'dk');
  906. INSERT INTO `country` VALUES ('8', '埃及', 'eg');
  907. INSERT INTO `country` VALUES ('9', '法国', 'fr');
  908. INSERT INTO `country` VALUES ('10', '希腊', 'gr');
  909. INSERT INTO `country` VALUES ('11', '香港', 'hk');
  910. INSERT INTO `country` VALUES ('12', '印度尼西亚', 'id');
  911. INSERT INTO `country` VALUES ('13', '爱尔兰', 'ie');
  912. INSERT INTO `country` VALUES ('14', '以色列', 'il');
  913. INSERT INTO `country` VALUES ('15', '印度', 'in');
  914. INSERT INTO `country` VALUES ('16', '伊拉克', 'iq');
  915. INSERT INTO `country` VALUES ('17', '伊朗', 'ir');
  916. INSERT INTO `country` VALUES ('18', '意大利', 'it');
  917. INSERT INTO `country` VALUES ('19', '日本', 'jp');
  918. INSERT INTO `country` VALUES ('20', '韩国', 'kr');
  919. INSERT INTO `country` VALUES ('21', '墨西哥', 'mx');
  920. INSERT INTO `country` VALUES ('22', '马来西亚', 'my');
  921. INSERT INTO `country` VALUES ('23', '荷兰', 'nl');
  922. INSERT INTO `country` VALUES ('24', '挪威', 'no');
  923. INSERT INTO `country` VALUES ('25', '纽西兰', 'nz');
  924. INSERT INTO `country` VALUES ('26', '菲律宾', 'ph');
  925. INSERT INTO `country` VALUES ('27', '俄罗斯', 'ru');
  926. INSERT INTO `country` VALUES ('28', '瑞典', 'se');
  927. INSERT INTO `country` VALUES ('29', '新加坡', 'sg');
  928. INSERT INTO `country` VALUES ('30', '泰国', 'th');
  929. INSERT INTO `country` VALUES ('31', '土耳其', 'tr');
  930. INSERT INTO `country` VALUES ('32', '台湾', 'tw');
  931. INSERT INTO `country` VALUES ('33', '英国', 'uk');
  932. INSERT INTO `country` VALUES ('34', '美国', 'us');
  933. INSERT INTO `country` VALUES ('35', '越南', 'vn');
  934. INSERT INTO `country` VALUES ('36', '波兰', 'pl');
  935. INSERT INTO `country` VALUES ('37', '哈萨克斯坦', 'kz');
  936. INSERT INTO `country` VALUES ('38', '乌克兰', 'ua');
  937. INSERT INTO `country` VALUES ('39', '罗马尼亚', 'ro');
  938. INSERT INTO `country` VALUES ('40', '阿联酋', 'ae');
  939. INSERT INTO `country` VALUES ('41', '南非', 'za');
  940. INSERT INTO `country` VALUES ('42', '缅甸', 'mm');
  941. INSERT INTO `country` VALUES ('43', '冰岛', 'is');
  942. INSERT INTO `country` VALUES ('44', '芬兰', 'fi');
  943. INSERT INTO `country` VALUES ('45', '卢森堡', 'lu');
  944. INSERT INTO `country` VALUES ('46', '比利时', 'be');
  945. INSERT INTO `country` VALUES ('47', '保加利亚', 'bg');
  946. INSERT INTO `country` VALUES ('48', '立陶宛', 'lt');
  947. INSERT INTO `country` VALUES ('49', '哥伦比亚', 'co');
  948. INSERT INTO `country` VALUES ('50', '澳门', 'mo');
  949. INSERT INTO `country` VALUES ('51', '肯尼亚', 'ke');
  950. INSERT INTO `country` VALUES ('52', '捷克', 'cz');
  951. INSERT INTO `country` VALUES ('53', '摩尔多瓦', 'md');
  952. INSERT INTO `country` VALUES ('54', '西班牙', 'es');
  953. INSERT INTO `country` VALUES ('55', '巴基斯坦', 'pk');
  954. INSERT INTO `country` VALUES ('56', '葡萄牙', 'pt');
  955. INSERT INTO `country` VALUES ('57', '匈牙利', 'hu');
  956. INSERT INTO `country` VALUES ('58', '阿根廷', 'ar');
  957. -- ----------------------------
  958. -- Table structure for `payment`
  959. -- ----------------------------
  960. CREATE TABLE `payment` (
  961. `id` int(11) NOT NULL AUTO_INCREMENT,
  962. `sn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  963. `user_id` int(11) NOT NULL COMMENT '用户ID',
  964. `oid` int(11) DEFAULT NULL COMMENT '本地订单ID',
  965. `order_sn` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '本地订单长ID',
  966. `pay_way` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '支付方式:1-微信、2-支付宝',
  967. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '金额,单位分',
  968. `qr_id` int(11) NOT NULL DEFAULT '0' COMMENT '有赞生成的支付单ID',
  969. `qr_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '有赞生成的支付二维码URL',
  970. `qr_code` text COLLATE utf8mb4_unicode_ci COMMENT '有赞生成的支付二维码图片base64',
  971. `qr_local_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '支付二维码的本地存储URL',
  972. `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态:-1-支付失败、0-等待支付、1-支付成功',
  973. `created_at` datetime NOT NULL,
  974. `updated_at` datetime NOT NULL,
  975. PRIMARY KEY (`id`)
  976. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='支付单';
  977. -- ----------------------------
  978. -- Table structure for `payment_callback`
  979. -- ----------------------------
  980. CREATE TABLE `payment_callback` (
  981. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  982. `client_id` varchar(50) DEFAULT NULL,
  983. `yz_id` varchar(50) DEFAULT NULL,
  984. `kdt_id` varchar(50) DEFAULT NULL,
  985. `kdt_name` varchar(50) DEFAULT NULL,
  986. `mode` tinyint(4) DEFAULT NULL,
  987. `msg` text,
  988. `sendCount` int(11) DEFAULT NULL,
  989. `sign` varchar(32) DEFAULT NULL,
  990. `status` varchar(30) DEFAULT NULL,
  991. `test` tinyint(4) DEFAULT NULL,
  992. `type` varchar(50) DEFAULT NULL,
  993. `version` varchar(50) DEFAULT NULL,
  994. `created_at` datetime DEFAULT NULL,
  995. `updated_at` datetime DEFAULT NULL,
  996. PRIMARY KEY (`id`)
  997. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='有赞云回调日志';
  998. -- ----------------------------
  999. -- Table structure for `marketing`
  1000. -- ----------------------------
  1001. CREATE TABLE `marketing` (
  1002. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1003. `type` TINYINT(4) NOT NULL COMMENT '类型:1-邮件群发、2-订阅渠道群发',
  1004. `receiver` TEXT NOT NULL COMMENT '接收者' COLLATE 'utf8mb4_unicode_ci',
  1005. `title` VARCHAR(255) NOT NULL COMMENT '标题' COLLATE 'utf8mb4_unicode_ci',
  1006. `content` TEXT NOT NULL COMMENT '内容' COLLATE 'utf8mb4_unicode_ci',
  1007. `error` VARCHAR(255) NULL COMMENT '错误信息' COLLATE 'utf8mb4_unicode_ci',
  1008. `status` TINYINT(4) NOT NULL COMMENT '状态:-1-失败、0-待发送、1-成功',
  1009. `created_at` DATETIME NOT NULL,
  1010. `updated_at` DATETIME NOT NULL,
  1011. PRIMARY KEY (`id`)
  1012. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='营销';
  1013. -- ----------------------------
  1014. -- Table structure for `user_login_log`
  1015. -- ----------------------------
  1016. CREATE TABLE `user_login_log` (
  1017. `id` INT(11) NOT NULL AUTO_INCREMENT,
  1018. `user_id` INT(11) NOT NULL DEFAULT '0',
  1019. `ip` CHAR(20) NOT NULL,
  1020. `country` CHAR(20) NOT NULL,
  1021. `province` CHAR(20) NOT NULL,
  1022. `city` CHAR(20) NOT NULL,
  1023. `county` CHAR(20) NOT NULL,
  1024. `isp` CHAR(20) NOT NULL,
  1025. `area` CHAR(20) NOT NULL,
  1026. `created_at` DATETIME NOT NULL,
  1027. `updated_at` DATETIME NOT NULL,
  1028. PRIMARY KEY (`id`)
  1029. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户登录日志';
  1030. -- ----------------------------
  1031. -- Table structure for `ss_node_ip`
  1032. -- ----------------------------
  1033. CREATE TABLE `ss_node_ip` (
  1034. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1035. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  1036. `port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
  1037. `type` char(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'tcp' COMMENT '类型:all、tcp、udp',
  1038. `ip` text COLLATE utf8mb4_unicode_ci COMMENT '连接IP:每个IP用,号隔开',
  1039. `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '上报时间',
  1040. PRIMARY KEY (`id`),
  1041. INDEX `idx_node` (`node_id`),
  1042. INDEX `idx_port` (`port`)
  1043. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  1044. -- ----------------------------
  1045. -- Table structure for `rule`
  1046. -- ----------------------------
  1047. CREATE TABLE `rule` (
  1048. `id` INT(11) NOT NULL AUTO_INCREMENT,
  1049. `type` CHAR(10) NOT NULL DEFAULT 'domain' COMMENT '类型:domain-域名(单一非通配)、ipv4-IPv4地址、ipv6-IPv6地址、reg-正则表达式',
  1050. `regular` VARCHAR(255) NOT NULL COMMENT '规则:域名、IP、正则表达式',
  1051. PRIMARY KEY (`id`)
  1052. ) ENGINE=MyISAM COLLATE='utf8_general_ci' COMMENT='规则表';
  1053. -- ----------------------------
  1054. -- Table structure for `ss_node_deny`
  1055. -- ----------------------------
  1056. CREATE TABLE `ss_node_deny` (
  1057. `id` INT(11) NOT NULL AUTO_INCREMENT,
  1058. `node_id` INT(11) NOT NULL DEFAULT '0',
  1059. `rule_id` INT(11) NOT NULL DEFAULT '0',
  1060. PRIMARY KEY (`id`)
  1061. ) ENGINE=MyISAM COLLATE='utf8_general_ci' COMMENT='节点访问规则关联表';
  1062. -- ----------------------------
  1063. -- Table structure for `device`
  1064. -- ----------------------------
  1065. CREATE TABLE `device` (
  1066. `id` INT(11) NOT NULL AUTO_INCREMENT,
  1067. `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:1-Shadowsocks(R)、2-V2Ray',
  1068. `platform` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '所属平台:0-其他、1-iOS、2-Android、3-Mac、4-Windows、5-Linux',
  1069. `name` VARCHAR(50) NOT NULL COMMENT '设备名称',
  1070. `status` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '状态:0-禁止订阅、1-允许订阅',
  1071. PRIMARY KEY (`id`)
  1072. ) COMMENT='设备型号表' ENGINE=MyISAM;
  1073. -- ----------------------------
  1074. -- Records of `device`
  1075. -- ----------------------------
  1076. INSERT INTO `device` VALUES ('1', '1', '1', 'Quantumult', 1);
  1077. INSERT INTO `device` VALUES ('1', '1', '1', 'Shadowrocket', 1);
  1078. INSERT INTO `device` VALUES ('1', '1', '1', 'ShadowsocksX-NG-R', 1);
  1079. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  1080. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  1081. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  1082. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  1083. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  1084. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;