db.sql 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343
  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-256-cfb' COMMENT '加密方式',
  33. `protocol` VARCHAR(64) NOT NULL DEFAULT 'origin' COMMENT '协议',
  34. `protocol_param` VARCHAR(128) NULL DEFAULT '' COMMENT '协议参数',
  35. `obfs` VARCHAR(64) NOT NULL DEFAULT 'plain' COMMENT '混淆',
  36. `obfs_param` VARCHAR(255) 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_ddns` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否使用DDNS:0-否、1-是',
  43. `is_transit` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否中转节点:0-否、1-是',
  44. `ssh_port` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '22' COMMENT 'SSH端口',
  45. `detectionType` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '节点检测: 0-关闭、1-只检测TCP、2-只检测ICMP、3-检测全部',
  46. `compatible` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '兼容SS',
  47. `single` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '启用单端口功能:0-否、1-是',
  48. `port` varchar(50) NULL COMMENT '单端口的端口号',
  49. `passwd` varchar(255) NULL COMMENT '单端口的连接密码',
  50. `sort` INT(11) NOT NULL DEFAULT '0' COMMENT '排序值,值越大越靠前显示',
  51. `status` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '状态:0-维护、1-正常',
  52. `v2_alter_id` INT(11) NOT NULL DEFAULT '16' COMMENT 'V2ray额外ID',
  53. `v2_port` INT(11) NOT NULL DEFAULT '0' COMMENT 'V2ray端口',
  54. `v2_method` VARCHAR(32) NOT NULL DEFAULT 'aes-128-gcm' COMMENT 'V2ray加密方式',
  55. `v2_net` VARCHAR(16) NOT NULL DEFAULT 'tcp' COMMENT 'V2ray传输协议',
  56. `v2_type` VARCHAR(32) NOT NULL DEFAULT 'none' COMMENT 'V2ray伪装类型',
  57. `v2_host` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'V2ray伪装的域名',
  58. `v2_path` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'V2ray WS/H2路径',
  59. `v2_tls` TINYINT(4) NOT NULL DEFAULT '0' COMMENT 'V2ray底层传输安全 0 未开启 1 开启',
  60. `v2_insider_port` INT(11) NOT NULL DEFAULT '10550' COMMENT 'V2ray内部端口(内部监听),v2_port为0时有效',
  61. `v2_outsider_port` INT(11) NOT NULL DEFAULT '443' COMMENT 'V2ray外部端口(外部覆盖),v2_port为0时有效',
  62. `created_at` datetime NOT NULL,
  63. `updated_at` datetime NOT NULL,
  64. PRIMARY KEY (`id`),
  65. INDEX `idx_group` (`group_id`),
  66. INDEX `idx_sub` (`is_subscribe`)
  67. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点信息表';
  68. -- ----------------------------
  69. -- Table structure for `ss_node_info`
  70. -- ----------------------------
  71. create TABLE `ss_node_info` (
  72. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  73. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  74. `uptime` int(11) NOT NULL COMMENT '后端存活时长,单位秒',
  75. `load` varchar(255) NOT NULL COMMENT '负载',
  76. `log_time` int(11) NOT NULL COMMENT '记录时间',
  77. PRIMARY KEY (`id`),
  78. INDEX `idx_node_id` (`node_id`) USING BTREE
  79. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点心跳信息';
  80. -- ----------------------------
  81. -- Table structure for `ss_node_online_log`
  82. -- ----------------------------
  83. create TABLE `ss_node_online_log` (
  84. `id` int(11) NOT NULL AUTO_INCREMENT,
  85. `node_id` int(11) NOT NULL COMMENT '节点ID',
  86. `online_user` int(11) NOT NULL COMMENT '在线用户数',
  87. `log_time` int(11) NOT NULL COMMENT '记录时间',
  88. PRIMARY KEY (`id`),
  89. INDEX `idx_node_id` (`node_id`) USING BTREE
  90. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点在线信息';
  91. -- ----------------------------
  92. -- Table structure for `ss_node_ping`
  93. -- ----------------------------
  94. create TABLE `ss_node_ping` (
  95. `id` INT(11) NOT NULL AUTO_INCREMENT,
  96. `node_id` INT(11) NOT NULL DEFAULT '0' COMMENT '对应节点id',
  97. `ct` INT(11) NOT NULL DEFAULT '0' COMMENT '电信',
  98. `cu` INT(11) NOT NULL DEFAULT '0' COMMENT '联通',
  99. `cm` INT(11) NOT NULL DEFAULT '0' COMMENT '移动',
  100. `hk` INT(11) NOT NULL DEFAULT '0' COMMENT '香港',
  101. `created_at` datetime NOT NULL,
  102. `updated_at` datetime NOT NULL,
  103. PRIMARY KEY (`id`),
  104. INDEX `idx_node_id` (`node_id`) USING BTREE
  105. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点ping信息表';
  106. -- ----------------------------
  107. -- Table structure for `ss_node_label`
  108. -- ----------------------------
  109. create TABLE `ss_node_label` (
  110. `id` int(11) NOT NULL AUTO_INCREMENT,
  111. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  112. `label_id` int(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
  113. PRIMARY KEY (`id`),
  114. INDEX `idx_node_label` (`node_id`,`label_id`)
  115. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点标签';
  116. -- ----------------------------
  117. -- Table structure for `user`
  118. -- ----------------------------
  119. create TABLE `user` (
  120. `id` int(11) NOT NULL AUTO_INCREMENT,
  121. `username` text NOT NULL DEFAULT '' COMMENT '昵称',
  122. `email` varchar(128) NOT NULL DEFAULT '' COMMENT '用户名',
  123. `password` varchar(64) NOT NULL DEFAULT '' COMMENT '密码',
  124. `port` int(11) NOT NULL DEFAULT '0' COMMENT '代理端口',
  125. `passwd` varchar(16) NOT NULL DEFAULT '' COMMENT '代理密码',
  126. `vmess_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'V2Ray用户ID',
  127. `transfer_enable` bigint(20) NOT NULL DEFAULT '1099511627776' COMMENT '可用流量,单位字节,默认1TiB',
  128. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '已上传流量,单位字节',
  129. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '已下载流量,单位字节',
  130. `t` int(11) NOT NULL DEFAULT '0' COMMENT '最后使用时间',
  131. `ip` char(128) DEFAULT NULL COMMENT '最后连接IP',
  132. `enable` tinyint(4) NOT NULL DEFAULT '1' COMMENT '代理状态',
  133. `method` varchar(30) NOT NULL DEFAULT 'aes-256-cfb' COMMENT '加密方式',
  134. `protocol` varchar(30) NOT NULL DEFAULT 'origin' COMMENT '协议',
  135. `protocol_param` varchar(255) DEFAULT '' COMMENT '协议参数',
  136. `obfs` varchar(30) NOT NULL DEFAULT 'plain' COMMENT '混淆',
  137. `obfs_param` varchar(255) DEFAULT '' COMMENT '混淆参数',
  138. `speed_limit_per_con` bigint(20) NOT NULL DEFAULT '10737418240' COMMENT '单连接限速,默认10G,为0表示不限速,单位Byte',
  139. `speed_limit_per_user` bigint(20) NOT NULL DEFAULT '10737418240' COMMENT '单用户限速,默认10G,为0表示不限速,单位Byte',
  140. `wechat` varchar(30) DEFAULT '' COMMENT '微信',
  141. `qq` varchar(20) DEFAULT '' COMMENT 'QQ',
  142. `usage` VARCHAR(10) NOT NULL DEFAULT '4' COMMENT '用途:1-手机、2-电脑、3-路由器、4-其他',
  143. `pay_way` tinyint(4) NOT NULL DEFAULT '0' COMMENT '付费方式:0-免费、1-季付、2-月付、3-半年付、4-年付',
  144. `balance` int(11) NOT NULL DEFAULT '0' COMMENT '余额,单位分',
  145. `enable_time` date DEFAULT NULL COMMENT '开通日期',
  146. `expire_time` date NOT NULL DEFAULT '2099-01-01' COMMENT '过期时间',
  147. `ban_time` int(11) NOT NULL DEFAULT '0' COMMENT '封禁到期时间',
  148. `remark` text COMMENT '备注',
  149. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '等级:可定义名称',
  150. `is_admin` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否管理员:0-否、1-是',
  151. `reg_ip` char(128) NOT NULL DEFAULT '127.0.0.1' COMMENT '注册IP',
  152. `last_login` int(11) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
  153. `referral_uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人',
  154. `reset_time` datetime DEFAULT NULL COMMENT '流量重置日期,NULL表示不重置',
  155. `invite_num` INT NOT NULL DEFAULT '0' COMMENT '可生成邀请码数',
  156. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-禁用、0-未激活、1-正常',
  157. `remember_token` varchar(256) DEFAULT '',
  158. `created_at` datetime DEFAULT NULL,
  159. `updated_at` datetime DEFAULT NULL,
  160. PRIMARY KEY (`id`),
  161. UNIQUE INDEX `unq_email` (`email`),
  162. INDEX `idx_search` (`enable`, `status`, `port`)
  163. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户';
  164. LOCK TABLES `user` WRITE;
  165. /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  166. insert into `user` (`id`, `username`, `email`, `password`, `port`, `passwd`, `vmess_id`, `transfer_enable`, `u`, `d`, `t`, `enable`, `method`, `protocol`, `obfs`, `obfs_param`, `wechat`, `qq`, `usage`, `pay_way`, `balance`, `enable_time`, `expire_time`, `remark`, `is_admin`, `reg_ip`, `status`, `created_at`, `updated_at`)
  167. VALUES (1,'管理员','test@test.com','$2y$10$ryMdx5ejvCSdjvZVZAPpOuxHrsAUY8FEINUATy6RCck6j9EeHhPfq',10000,'@123', 'c6effafd-6046-7a84-376e-b0429751c304', 1099511627776,0,0,0,1,'aes-256-cfb','origin','plain',0,'','',1,3,0.00,'2017-01-01','2099-01-01',NULL,1,'127.0.0.1',1,now(),now());
  168. /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  169. UNLOCK TABLES;
  170. -- ----------------------------
  171. -- Table structure for `level`
  172. -- ----------------------------
  173. create TABLE `level` (
  174. `id` int(11) NOT NULL AUTO_INCREMENT,
  175. `level` int(11) NOT NULL DEFAULT '1' COMMENT '等级',
  176. `level_name` varchar(100) NOT NULL DEFAULT '' COMMENT '等级名称',
  177. PRIMARY KEY (`id`)
  178. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='等级';
  179. -- ----------------------------
  180. -- Records of `level`
  181. -- ----------------------------
  182. insert into `level` VALUES (1, '1', '普通用户');
  183. insert into `level` VALUES (2, '2', 'VIP1');
  184. insert into `level` VALUES (3, '3', 'VIP2');
  185. insert into `level` VALUES (4, '4', 'VIP3');
  186. -- ----------------------------
  187. -- Table structure for `user_traffic_log`
  188. -- ----------------------------
  189. create TABLE `user_traffic_log` (
  190. `id` int(11) NOT NULL AUTO_INCREMENT,
  191. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  192. `u` int(11) NOT NULL DEFAULT '0' COMMENT '上传流量',
  193. `d` int(11) NOT NULL DEFAULT '0' COMMENT '下载流量',
  194. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  195. `rate` float NOT NULL COMMENT '流量比例',
  196. `traffic` varchar(32) NOT NULL COMMENT '产生流量',
  197. `log_time` int(11) NOT NULL COMMENT '记录时间',
  198. PRIMARY KEY (`id`),
  199. INDEX `idx_user_node_time` (`user_id`, `node_id`, `log_time`)
  200. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户流量日志';
  201. -- ----------------------------
  202. -- Table structure for `ss_config`
  203. -- ----------------------------
  204. drop table IF EXISTS `ss_config`;
  205. create TABLE `ss_config` (
  206. `id` INT(11) NOT NULL AUTO_INCREMENT,
  207. `name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '配置名' COLLATE 'utf8mb4_unicode_ci',
  208. `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:1-加密方式、2-协议、3-混淆',
  209. `is_default` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '是否默认:0-不是、1-是',
  210. `sort` INT(11) NOT NULL DEFAULT '0' COMMENT '排序:值越大排越前',
  211. PRIMARY KEY (`id`)
  212. ) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='通用配置';
  213. -- ----------------------------
  214. -- Records of `ss_config`
  215. -- ----------------------------
  216. insert into `ss_config` VALUES ('1', 'none', '1', '0', '0');
  217. insert into `ss_config` VALUES ('2', 'rc4', '1', '0', '0');
  218. insert into `ss_config` VALUES ('3', 'rc4-md5', '1', '0', '0');
  219. insert into `ss_config` VALUES ('4', 'rc4-md5-6', '1', '0', '0');
  220. insert into `ss_config` VALUES ('5', 'bf-cfb', '1', '0', '0');
  221. insert into `ss_config` VALUES ('6', 'aes-128-cfb', '1', '0', '0');
  222. insert into `ss_config` VALUES ('7', 'aes-192-cfb', '1', '0', '0');
  223. insert into `ss_config` VALUES ('8', 'aes-256-cfb', '1', '1', '0');
  224. insert into `ss_config` VALUES ('9', 'aes-128-ctr', '1', '0', '0');
  225. insert into `ss_config` VALUES ('10', 'aes-192-ctr', '1', '0', '0');
  226. insert into `ss_config` VALUES ('11', 'aes-256-ctr', '1', '0', '0');
  227. insert into `ss_config` VALUES ('12', 'camellia-128-cfb', '1', '0', '0');
  228. insert into `ss_config` VALUES ('13', 'camellia-192-cfb', '1', '0', '0');
  229. insert into `ss_config` VALUES ('14', 'camellia-256-cfb', '1', '0', '0');
  230. insert into `ss_config` VALUES ('15', 'salsa20', '1', '0', '0');
  231. insert into `ss_config` VALUES ('16', 'xsalsa20', '1', '0', '0');
  232. insert into `ss_config` VALUES ('17', 'chacha20', '1', '0', '0');
  233. insert into `ss_config` VALUES ('18', 'xchacha20', '1', '0', '0');
  234. insert into `ss_config` VALUES ('19', 'chacha20-ietf', '1', '0', '0');
  235. insert into `ss_config` VALUES ('20', 'chacha20-ietf-poly1305', '1', '0', '0');
  236. insert into `ss_config` VALUES ('21', 'chacha20-poly1305', '1', '0', '0');
  237. insert into `ss_config` VALUES ('22', 'xchacha-ietf-poly1305', '1', '0', '0');
  238. insert into `ss_config` VALUES ('23', 'aes-128-gcm', '1', '0', '0');
  239. insert into `ss_config` VALUES ('24', 'aes-192-gcm', '1', '0', '0');
  240. insert into `ss_config` VALUES ('25', 'aes-256-gcm', '1', '0', '0');
  241. insert into `ss_config` VALUES ('26', 'sodium-aes-256-gcm', '1', '0', '0');
  242. insert into `ss_config` VALUES ('27', 'origin', '2', '1', '0');
  243. insert into `ss_config` VALUES ('28', 'auth_sha1_v4', '2', '0', '0');
  244. insert into `ss_config` VALUES ('29', 'auth_aes128_md5', '2', '0', '0');
  245. insert into `ss_config` VALUES ('30', 'auth_aes128_sha1', '2', '0', '0');
  246. insert into `ss_config` VALUES ('31', 'auth_chain_a', '2', '0', '0');
  247. insert into `ss_config` VALUES ('32', 'auth_chain_b', '2', '0', '0');
  248. insert into `ss_config` VALUES ('33', 'plain', '3', '1', '0');
  249. insert into `ss_config` VALUES ('34', 'http_simple', '3', '0', '0');
  250. insert into `ss_config` VALUES ('35', 'http_post', '3', '0', '0');
  251. insert into `ss_config` VALUES ('36', 'tls1.2_ticket_auth', '3', '0', '0');
  252. insert into `ss_config` VALUES ('37', 'tls1.2_ticket_fastauth', '3', '0', '0');
  253. insert into `ss_config` VALUES ('38', 'auth_chain_c', '2', '0', '0');
  254. insert into `ss_config` VALUES ('39', 'auth_chain_d', '2', '0', '0');
  255. insert into `ss_config` VALUES ('40', 'auth_chain_e', '2', '0', '0');
  256. insert into `ss_config` VALUES ('41', 'auth_chain_f', '2', '0', '0');
  257. -- ----------------------------
  258. -- Table structure for `config`
  259. -- ----------------------------
  260. create TABLE `config` (
  261. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  262. `name` varchar(255) NOT NULL DEFAULT '' COMMENT '配置名',
  263. `value` TEXT NULL COMMENT '配置值',
  264. PRIMARY KEY (`id`)
  265. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='系统配置';
  266. -- ----------------------------
  267. -- Records of config
  268. -- ----------------------------
  269. insert into `config` VALUES ('1', 'is_rand_port', 0);
  270. insert into `config` VALUES ('2', 'is_user_rand_port', 0);
  271. insert into `config` VALUES ('3', 'invite_num', 3);
  272. insert into `config` VALUES ('4', 'is_register', 1);
  273. insert into `config` VALUES ('5', 'is_invite_register', 2);
  274. insert into `config` VALUES ('6', 'website_name', 'SSRPanel');
  275. insert into `config` VALUES ('7', 'is_reset_password', 1);
  276. insert into `config` VALUES ('8', 'reset_password_times', 3);
  277. insert into `config` VALUES ('9', 'website_url', 'https://www.ssrpanel.com');
  278. insert into `config` VALUES ('10', 'referral_type', 0);
  279. insert into `config` VALUES ('11', 'active_times', 3);
  280. insert into `config` VALUES ('12', 'is_checkin', 1);
  281. insert into `config` VALUES ('13', 'min_rand_traffic', 10);
  282. insert into `config` VALUES ('14', 'max_rand_traffic', 500);
  283. insert into `config` VALUES ('15', 'wechat_qrcode', '');
  284. insert into `config` VALUES ('16', 'alipay_qrcode', '');
  285. insert into `config` VALUES ('17', 'traffic_limit_time', 1440);
  286. insert into `config` VALUES ('18', 'referral_traffic', 1024);
  287. insert into `config` VALUES ('19', 'referral_percent', 0.2);
  288. insert into `config` VALUES ('20', 'referral_money', 100);
  289. insert into `config` VALUES ('21', 'referral_status', 1);
  290. insert into `config` VALUES ('22', 'default_traffic', 1024);
  291. insert into `config` VALUES ('23', 'traffic_warning', 0);
  292. insert into `config` VALUES ('24', 'traffic_warning_percent', 80);
  293. insert into `config` VALUES ('25', 'expire_warning', 0);
  294. insert into `config` VALUES ('26', 'expire_days', 15);
  295. insert into `config` VALUES ('27', 'reset_traffic', 1);
  296. insert into `config` VALUES ('28', 'default_days', 7);
  297. insert into `config` VALUES ('29', 'subscribe_max', 3);
  298. insert into `config` VALUES ('30', 'min_port', 10000);
  299. insert into `config` VALUES ('31', 'max_port', 20000);
  300. insert into `config` VALUES ('32', 'is_captcha', 0);
  301. insert into `config` VALUES ('33', 'is_traffic_ban', 1);
  302. insert into `config` VALUES ('34', 'traffic_ban_value', 10);
  303. insert into `config` VALUES ('35', 'traffic_ban_time', 60);
  304. insert into `config` VALUES ('36', 'is_clear_log', 1);
  305. insert into `config` VALUES ('37', 'is_node_offline', 0);
  306. insert into `config` VALUES ('38', 'webmaster_email', '');
  307. insert into `config` VALUES ('39', 'is_notification', 0);
  308. insert into `config` VALUES ('40', 'server_chan_key', '');
  309. insert into `config` VALUES ('41', 'is_subscribe_ban', 1);
  310. insert into `config` VALUES ('42', 'subscribe_ban_times', 20);
  311. insert into `config` VALUES ('43', 'codepay_url', '');
  312. insert into `config` VALUES ('44', 'codepay_id', '');
  313. insert into `config` VALUES ('45', 'codepay_key', '');
  314. insert into `config` VALUES ('46', 'is_free_code', 0);
  315. insert into `config` VALUES ('47', 'is_forbid_robot', 0);
  316. insert into `config` VALUES ('48', 'subscribe_domain', '');
  317. insert into `config` VALUES ('49', 'auto_release_port', 1);
  318. insert into `config` VALUES ('50', 'website_callback_url', '');
  319. insert into `config` VALUES ('51', 'youzan_client_id', '');
  320. insert into `config` VALUES ('52', 'youzan_client_secret', '');
  321. insert into `config` VALUES ('53', 'kdt_id', '');
  322. insert into `config` VALUES ('54', 'initial_labels_for_user', '');
  323. insert into `config` VALUES ('55', 'website_analytics', '');
  324. insert into `config` VALUES ('56', 'website_customer_service', '');
  325. insert into `config` VALUES ('57', 'register_ip_limit', 5);
  326. insert into `config` VALUES ('58', 'is_email_filtering', '0');
  327. insert into `config` VALUES ('59', 'is_push_bear', 0);
  328. insert into `config` VALUES ('60', 'push_bear_send_key', '');
  329. insert into `config` VALUES ('61', 'push_bear_qrcode', '');
  330. insert into `config` VALUES ('62', 'is_ban_status', 0);
  331. insert into `config` VALUES ('63', 'is_namesilo', 0);
  332. insert into `config` VALUES ('64', 'namesilo_key', '');
  333. insert into `config` VALUES ('65', 'website_logo', '');
  334. insert into `config` VALUES ('66', 'website_home_logo', '');
  335. insert into `config` VALUES ('67', 'nodes_detection', 0);
  336. insert into `config` VALUES ('68', 'detection_check_times', 3);
  337. insert into `config` VALUES ('69', 'is_forbid_china', 0);
  338. insert into `config` VALUES ('70', 'is_forbid_oversea', 0);
  339. insert into `config` VALUES ('71', 'AppStore_id', 0);
  340. insert into `config` VALUES ('72', 'AppStore_password', 0);
  341. insert into `config` VALUES ('73', 'is_activate_account', 0);
  342. insert into `config` VALUES ('74', 'node_daily_report', 0);
  343. insert into `config` VALUES ('75', 'mix_subscribe', 0);
  344. insert into `config` VALUES ('76', 'rand_subscribe', 0);
  345. insert into `config` VALUES ('77', 'is_custom_subscribe', 0);
  346. insert into `config` VALUES ('78', 'is_AliPay', '');
  347. insert into `config` VALUES ('79', 'is_QQ', '');
  348. insert into `config` VALUES ('80', 'is_WeChat', '');
  349. insert into `config` VALUES ('81', 'is_otherPay', '');
  350. insert into `config` VALUES ('82', 'alipay_private_key', '');
  351. insert into `config` VALUES ('83', 'alipay_public_key', '');
  352. insert into `config` VALUES ('84', 'alipay_transport', 'http');
  353. insert into `config` VALUES ('85', 'alipay_currency', 'USD');
  354. insert into `config` VALUES ('86', 'bitpay_secret', '');
  355. insert into `config` VALUES ('87', 'f2fpay_app_id', '');
  356. insert into `config` VALUES ('88', 'f2fpay_private_key', '');
  357. insert into `config` VALUES ('89', 'f2fpay_public_key', '');
  358. insert into `config` VALUES ('90', 'website_security_code', '');
  359. insert into `config` VALUES ('91', 'subject_name', '');
  360. insert into `config` VALUES ('92', 'geetest_id', '');
  361. insert into `config` VALUES ('93', 'geetest_key', '');
  362. insert into `config` VALUES ('94', 'google_captcha_sitekey', '');
  363. insert into `config` VALUES ('95', 'google_captcha_secret', '');
  364. insert into `config` VALUES ('96', 'user_invite_days', 7);
  365. insert into `config` VALUES ('97', 'admin_invite_days', 7);
  366. insert into `config` VALUES ('98', 'offline_check_times', '');
  367. insert into `config` VALUES ('99', 'payjs_mch_id', '');
  368. insert into `config` VALUES ('100', 'payjs_key', '');
  369. insert into `config` VALUES ('101', 'maintenance_mode', '0');
  370. insert into `config` VALUES ('102', 'maintenance_time', '');
  371. insert into `config` VALUES ('103', 'maintenance_content', '');
  372. insert into `config` VALUES ('104', 'bark_key', '');
  373. insert into `config` VALUES ('105', 'hcaptcha_secret', '');
  374. insert into `config` VALUES ('106', 'hcaptcha_sitekey', '');
  375. insert into `config` VALUES ('107', 'paypal_username', '');
  376. insert into `config` VALUES ('108', 'paypal_password', '');
  377. insert into `config` VALUES ('109', 'paypal_secret', '');
  378. insert into `config` VALUES ('110', 'paypal_certificate', '');
  379. insert into `config` VALUES ('111', 'paypal_app_id', '');
  380. -- ----------------------------
  381. -- Table structure for `article`
  382. -- ----------------------------
  383. create TABLE `article` (
  384. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  385. `title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
  386. `author` varchar(50) DEFAULT '' COMMENT '作者',
  387. `summary` varchar(255) DEFAULT '' COMMENT '简介',
  388. `logo` varchar(255) DEFAULT '' COMMENT 'LOGO',
  389. `content` text COMMENT '内容',
  390. `type` tinyint(4) DEFAULT '1' COMMENT '类型:1-文章、2-公告、3-购买说明、4-使用教程',
  391. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  392. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  393. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  394. `deleted_at` datetime NULL DEFAULT NULL COMMENT '删除时间',
  395. PRIMARY KEY (`id`)
  396. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='文章';
  397. -- ----------------------------
  398. -- Records of `article`
  399. -- ----------------------------
  400. insert into article(title, author, content, type, sort)
  401. values('购买说明', '管理员', '<h4>购买流程:</h4><ol class=" list-paddingleft-2"><li><p>第一步:先购买基础套餐。</p></li><li><p>第二步:按需求,选择是否购买流量包。</p></li></ol><h4>基础套餐:</h4><ol class=" list-paddingleft-2"><li><p>在套餐生效的时间内,您将获得「套餐对应的网络速度」、「套餐内相应的流量」及其它特权。</p></li><li><p>基础套餐每月将会重置一次流量,重置日为购买日。</p></li><li><p>如在套餐未到期的情况下购买新套餐,则会导致旧套餐的所有配置立即失效,新套餐的配置立即生效。</p></li></ol><h4>流量包:</h4><ol class=" list-paddingleft-2"><li><p>当您在基础套餐重置日之前将流量耗尽,您可以选择购买流量包解燃眉之急。</p></li><li><p>流量包只在固定时间内增加可用流量,不会更改账户的配置,并且即时生效可以多个叠加。</p></li></ol>', '3', '0'), ('使用教程_Mac', '管理员', '<li> <a href=\"clients/ShadowsocksX-NG-R8-1.4.6.dmg\" target=\"_blank\">点击此处</a>下载客户端并启动 </li>\r\n<li> 点击状态栏纸飞机 -> 服务器 -> 编辑订阅 </li>\r\n<li> 点击窗口左下角 “+”号 新增订阅,完整复制本页上方“订阅服务”处地址,将其粘贴至“订阅地址”栏,点击右下角“OK” </li>\r\n<li> 点击纸飞机 -> 服务器 -> 手动更新订阅 </li>\r\n<li> 点击纸飞机 -> 服务器,选定合适服务器 </li>\r\n<li> 点击纸飞机 -> 打开Shadowsocks </li>\r\n<li> 点击纸飞机 -> PAC自动模式 </li>\r\n<li> 点击纸飞机 -> 代理设置->从 GFW List 更新 PAC </li>\r\n<li> 打开系统偏好设置 -> 网络,在窗口左侧选定显示为“已连接”的网络,点击右下角“高级...” </li>\r\n<li> 切换至“代理”选项卡,勾选“自动代理配置”和“不包括简单主机名”,点击右下角“好”,再次点击右下角“应用” </li>', '4', '1'), ('使用教程_Windows', '管理员', '<li> <a href=\"clients/ShadowsocksR-win.zip\" target=\"_blank\">点击此处</a>下载客户端并启动 </li>\r\n<li> 运行 ShadowsocksR 文件夹内的 ShadowsocksR.exe </li>\r\n<li> 右击桌面右下角状态栏(或系统托盘)纸飞机 -> 服务器订阅 -> SSR服务器订阅设置 </li>\r\n<li> 点击窗口左下角 “Add” 新增订阅,完整复制本页上方 “订阅服务” 处地址,将其粘贴至“网址”栏,点击“确定” </li>\r\n<li> 右击纸飞机 -> 服务器订阅 -> 更新SSR服务器订阅(不通过代理) </li>\r\n<li> 右击纸飞机 -> 服务器,选定合适服务器 </li>\r\n<li> 右击纸飞机 -> 系统代理模式 -> PAC模式 </li>\r\n<li> 右击纸飞机 -> PAC -> 更新PAC为GFWList </li>\r\n<li> 右击纸飞机 -> 代理规则 -> 绕过局域网和大陆 </li>\r\n<li> 右击纸飞机,取消勾选“服务器负载均衡” </li>', '4', '2'), ('使用教程_Linux', '管理员', '<li> <a href=\"clients/Shadowsocks-qt5-3.0.1.zip\" target=\"_blank\">点击此处</a>下载客户端并启动 </li>\r\n<li> 单击状态栏小飞机,找到服务器 -> 编辑订阅,复制黏贴订阅地址 </li>\r\n<li> 更新订阅设置即可 </li>', '4', '3'), ('使用教程_iOS', '管理员', '<li> 请从站长处获取 App Store 账号密码 </li>\r\n<li> 打开 Shadowrocket,点击右上角 “+”号 添加节点,类型选择 Subscribe </li>\r\n<li> 完整复制本页上方 “订阅服务” 处地址,将其粘贴至 “URL”栏,点击右上角 “完成” </li>\r\n<li> 左划新增的服务器订阅,点击 “更新” </li>\r\n<li> 选定合适服务器节点,点击右上角连接开关,屏幕上方状态栏出现“VPN”图标 </li>\r\n<li> 当进行海外游戏时请将 Shadowrocket “首页” 页面中的 “全局路由” 切换至 “代理”,并确保“设置”页面中的“UDP”已开启转发 </li>', '4', '4'), ('使用教程_Android', '管理员', '<li> <a href=\"clients/ShadowsocksRR-3.5.1.1.apk\" target=\"_blank\">点击此处</a>下载客户端并启动 </li>\r\n<li> 单击左上角的shadowsocksR进入配置文件页,点击右下角的“+”号,点击“添加/升级SSR订阅”,完整复制本页上方“订阅服务”处地址,填入订阅信息并保存 </li>\r\n<li> 选中任意一个节点,返回软件首页 </li>\r\n<li> 在软件首页处找到“路由”选项,并将其改为“绕过局域网及中国大陆地址” </li>\r\n<li> 点击右上角的小飞机图标进行连接,提示是否添加(或创建)VPN连接,点同意(或允许) </li>', '4', '5'), ('使用教程_Games', '管理员', '<li> <a href=\"clients/SSTap-beta-setup-1.0.9.7.zip\" target=\"_blank\">点击此处</a>下载客户端并安装 </li>\r\n<li> 打开 SSTap,选择 <i class=\"fa fa-cog\"></i> -> SSR订阅 -> SSR订阅管理,添加订阅地址 </li>\r\n<li> 添加完成后,再次选择 <i class=\"fa fa-cog\"></i> - SSR订阅 - 手动更新SSR订阅,即可同步节点列表。</li>\r\n<li> 在代理模式中选择游戏或「不代理中国IP」,点击「连接」即可加速。</li>\r\n<li> 需要注意的是,一旦连接成功,客户端会自动缩小到任务栏,可在设置中关闭。</li>', '4', '6');
  402. -- ----------------------------
  403. -- Table structure for `invite`
  404. -- ----------------------------
  405. create TABLE `invite` (
  406. `id` int(11) NOT NULL AUTO_INCREMENT,
  407. `uid` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人ID',
  408. `fuid` int(11) NOT NULL DEFAULT '0' COMMENT '受邀人ID',
  409. `code` char(32) NOT NULL COMMENT '邀请码',
  410. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '邀请码状态:0-未使用、1-已使用、2-已过期',
  411. `dateline` datetime DEFAULT NULL COMMENT '有效期至',
  412. `created_at` datetime DEFAULT NULL,
  413. `updated_at` datetime DEFAULT NULL,
  414. `deleted_at` datetime DEFAULT NULL COMMENT '删除时间',
  415. PRIMARY KEY (`id`)
  416. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='邀请码表';
  417. -- ----------------------------
  418. -- Table structure for `label`
  419. -- ----------------------------
  420. create TABLE `label` (
  421. `id` int(11) NOT NULL AUTO_INCREMENT,
  422. `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  423. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序值',
  424. PRIMARY KEY (`id`)
  425. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='标签';
  426. -- ----------------------------
  427. -- Records of `label`
  428. -- ----------------------------
  429. insert into `label` VALUES ('1', '电信', '0');
  430. insert into `label` VALUES ('2', '联通', '0');
  431. insert into `label` VALUES ('3', '移动', '0');
  432. insert into `label` VALUES ('4', '教育网', '0');
  433. insert into `label` VALUES ('5', '其他网络', '0');
  434. insert into `label` VALUES ('6', '免费体验', '0');
  435. -- ----------------------------
  436. -- Table structure for `verify`
  437. -- ----------------------------
  438. create TABLE `verify` (
  439. `id` int(11) NOT NULL AUTO_INCREMENT,
  440. `type` TINYINT NOT NULL DEFAULT '1' COMMENT '激活类型:1-自行激活、2-管理员激活',
  441. `user_id` int(11) NOT NULL COMMENT '用户ID',
  442. `token` varchar(32) NOT NULL COMMENT '校验token',
  443. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  444. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  445. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  446. PRIMARY KEY (`id`)
  447. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='账号激活邮件地址';
  448. -- ----------------------------
  449. -- Table structure for `verify_code`
  450. -- ----------------------------
  451. create TABLE `verify_code` (
  452. `id` int(11) NOT NULL AUTO_INCREMENT,
  453. `address` varchar(128) NOT NULL COMMENT '用户邮箱',
  454. `code` char(6) NOT NULL COMMENT '验证码',
  455. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  456. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  457. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  458. PRIMARY KEY (`id`)
  459. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='注册激活验证码';
  460. -- ----------------------------
  461. -- Table structure for `ss_group`
  462. -- ----------------------------
  463. create TABLE `ss_group` (
  464. `id` int(11) NOT NULL AUTO_INCREMENT,
  465. `name` varchar(50) NOT NULL COMMENT '分组名称',
  466. `level` tinyint(4) NOT NULL DEFAULT '1' COMMENT '分组级别',
  467. `created_at` datetime DEFAULT NULL,
  468. `updated_at` datetime DEFAULT NULL,
  469. PRIMARY KEY (`id`)
  470. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点分组';
  471. -- ----------------------------
  472. -- Table structure for `ss_group_node`
  473. -- ----------------------------
  474. create TABLE `ss_group_node` (
  475. `id` int(11) NOT NULL AUTO_INCREMENT,
  476. `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '分组ID',
  477. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  478. PRIMARY KEY (`id`)
  479. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分组节点关系表';
  480. -- ----------------------------
  481. -- Table structure for `goods`
  482. -- ----------------------------
  483. create TABLE `goods` (
  484. `id` int(11) NOT NULL AUTO_INCREMENT,
  485. `sku` varchar(15) NOT NULL DEFAULT '' COMMENT '商品服务SKU',
  486. `name` varchar(100) NOT NULL DEFAULT '' COMMENT '商品名称',
  487. `logo` varchar(255) NOT NULL DEFAULT '' COMMENT '商品图片地址',
  488. `traffic` bigint(20) NOT NULL DEFAULT '0' COMMENT '商品内含多少流量,单位MiB',
  489. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '商品类型:1-流量包、2-套餐、3-余额充值',
  490. `price` int(11) NOT NULL DEFAULT '0' COMMENT '售价,单位分',
  491. `renew` int(11) NOT NULL DEFAULT '0' COMMENT '流量重置价格,单位分',
  492. `period` int(11) NOT NULL DEFAULT '0' COMMENT '流量自动重置周期',
  493. `info` varchar(255) DEFAULT '' COMMENT '商品',
  494. `desc` varchar(255) DEFAULT '' COMMENT '商品描述',
  495. `days` int(11) NOT NULL DEFAULT '30' COMMENT '有效期',
  496. `invite_num` int(11) NOT NULL DEFAULT '0' COMMENT '赠送邀请码数',
  497. `limit_num` int(11) NOT NULL DEFAULT '0' COMMENT '限购数量,默认为0不限购',
  498. `color` VARCHAR(50) NOT NULL DEFAULT 'green' COMMENT '商品颜色',
  499. `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  500. `is_hot` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否热销:0-否、1-是',
  501. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-下架、1-上架',
  502. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  503. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  504. `deleted_at` datetime NULL DEFAULT NULL COMMENT '删除时间',
  505. PRIMARY KEY (`id`)
  506. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品';
  507. -- ----------------------------
  508. -- Table structure for `coupon`
  509. -- ----------------------------
  510. create TABLE `coupon` (
  511. `id` int(11) NOT NULL AUTO_INCREMENT,
  512. `name` varchar(50) NOT NULL COMMENT '优惠券名称',
  513. `logo` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券LOGO',
  514. `sn` varchar(50) NOT NULL DEFAULT '' COMMENT '优惠券码',
  515. `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '类型:1-现金券、2-折扣券、3-充值券',
  516. `usage` tinyint(4) NOT NULL DEFAULT '1' COMMENT '用途:1-仅限一次性使用、2-可重复使用',
  517. `amount` bigint(20) NOT NULL DEFAULT '0' COMMENT '金额,单位分',
  518. `discount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '折扣',
  519. `rule` bigint(20) NOT NULL DEFAULT '0' COMMENT '使用限制,单位分',
  520. `available_start` int(11) NOT NULL DEFAULT '0' COMMENT '有效期开始',
  521. `available_end` int(11) NOT NULL DEFAULT '0' COMMENT '有效期结束',
  522. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-未使用、1-已使用、2-已失效',
  523. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  524. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  525. `deleted_at` datetime NULL DEFAULT NULL COMMENT '删除时间',
  526. PRIMARY KEY (`id`),
  527. UNIQUE INDEX `unq_sn` (`sn`)
  528. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券';
  529. -- ----------------------------
  530. -- Table structure for `coupon_log`
  531. -- ----------------------------
  532. create TABLE `coupon_log` (
  533. `id` int(11) NOT NULL AUTO_INCREMENT,
  534. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  535. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  536. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  537. `desc` varchar(50) NOT NULL DEFAULT '' COMMENT '备注',
  538. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  539. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  540. PRIMARY KEY (`id`)
  541. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='优惠券使用日志';
  542. -- ----------------------------
  543. -- Table structure for `order`
  544. -- ----------------------------
  545. create TABLE `order` (
  546. `oid` int(11) NOT NULL AUTO_INCREMENT,
  547. `order_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '订单编号',
  548. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '操作人',
  549. `goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  550. `coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
  551. `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  552. `origin_amount` int(11) NOT NULL DEFAULT '0' COMMENT '订单原始总价,单位分',
  553. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '订单总价,单位分',
  554. `expire_at` datetime DEFAULT NULL COMMENT '过期时间',
  555. `is_expire` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否已过期:0-未过期、1-已过期',
  556. `pay_way` tinyint(4) NOT NULL DEFAULT '1' COMMENT '支付方式:balance、f2fpay、codepay、payjs、bitpayx等',
  557. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态:-1-已关闭、0-待支付、1-已支付待确认、2-已完成',
  558. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  559. `updated_at` datetime DEFAULT NULL COMMENT '最后一次更新时间',
  560. PRIMARY KEY (`oid`),
  561. INDEX `idx_order_search` (`user_id`, `goods_id`, `is_expire`, `status`)
  562. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单';
  563. -- ----------------------------
  564. -- Table structure for `ticket`
  565. -- ----------------------------
  566. create TABLE `ticket` (
  567. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  568. `user_id` int(11) NOT NULL DEFAULT '0',
  569. `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
  570. `content` text NOT NULL COMMENT '内容',
  571. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-待处理、1-已处理未关闭、2-已关闭',
  572. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  573. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  574. PRIMARY KEY (`id`)
  575. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工单';
  576. -- ----------------------------
  577. -- Table structure for `ticket_reply`
  578. -- ----------------------------
  579. create TABLE `ticket_reply` (
  580. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  581. `ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '工单ID',
  582. `user_id` int(11) NOT NULL COMMENT '回复人ID',
  583. `content` text NOT NULL COMMENT '回复内容',
  584. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  585. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  586. PRIMARY KEY (`id`)
  587. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='工单回复';
  588. -- ----------------------------
  589. -- Table structure for `user_balance_log`
  590. -- ----------------------------
  591. create TABLE `user_balance_log` (
  592. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  593. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '账号ID',
  594. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
  595. `before` int(11) NOT NULL DEFAULT '0' COMMENT '发生前余额,单位分',
  596. `after` int(11) NOT NULL DEFAULT '0' COMMENT '发生后金额,单位分',
  597. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '发生金额,单位分',
  598. `desc` varchar(255) DEFAULT '' COMMENT '操作描述',
  599. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  600. PRIMARY KEY (`id`)
  601. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户余额变动日志';
  602. -- ----------------------------
  603. -- Table structure for `user_traffic_modify_log`
  604. -- ----------------------------
  605. create TABLE `user_traffic_modify_log` (
  606. `id` int(11) NOT NULL AUTO_INCREMENT,
  607. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  608. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '发生的订单ID',
  609. `before` bigint(20) NOT NULL DEFAULT '0' COMMENT '操作前流量',
  610. `after` bigint(20) NOT NULL DEFAULT '0' COMMENT '操作后流量',
  611. `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '描述',
  612. `created_at` datetime NOT NULL,
  613. `updated_at` datetime NOT NULL,
  614. PRIMARY KEY (`id`)
  615. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户流量变动日志';
  616. -- ----------------------------
  617. -- Table structure for `referral_apply`
  618. -- ----------------------------
  619. create TABLE `referral_apply` (
  620. `id` int(11) NOT NULL AUTO_INCREMENT,
  621. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  622. `before` int(11) NOT NULL DEFAULT '0' COMMENT '操作前可提现金额,单位分',
  623. `after` int(11) NOT NULL DEFAULT '0' COMMENT '操作后可提现金额,单位分',
  624. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '本次提现金额,单位分',
  625. `link_logs` text NOT NULL DEFAULT '' COMMENT '关联返利日志ID,例如:1,3,4',
  626. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1-驳回、0-待审核、1-审核通过待打款、2-已打款',
  627. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  628. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  629. PRIMARY KEY (`id`)
  630. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='提现申请';
  631. -- ----------------------------
  632. -- Table structure for `referral_log`
  633. -- ----------------------------
  634. create TABLE `referral_log` (
  635. `id` int(11) NOT NULL AUTO_INCREMENT,
  636. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  637. `ref_user_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广人ID',
  638. `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '关联订单ID',
  639. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '消费金额,单位分',
  640. `ref_amount` int(11) NOT NULL DEFAULT '0' COMMENT '返利金额',
  641. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未提现、1-审核中、2-已提现',
  642. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  643. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  644. PRIMARY KEY (`id`)
  645. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='消费返利日志';
  646. -- ----------------------------
  647. -- Table structure for `notification_log`
  648. -- ----------------------------
  649. create TABLE `notification_log` (
  650. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  651. `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:1-邮件、2-serverChan、3-Bark',
  652. `address` VARCHAR(255) NOT NULL COMMENT '收信地址',
  653. `title` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '标题',
  654. `content` TEXT NOT NULL COMMENT '内容',
  655. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:-1发送失败、0-等待发送、1-发送成功',
  656. `error` text COMMENT '发送失败抛出的异常信息',
  657. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  658. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  659. PRIMARY KEY (`id`)
  660. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='通知投递记录';
  661. -- ----------------------------
  662. -- Table structure for `sensitive_words`
  663. -- ----------------------------
  664. create TABLE `sensitive_words` (
  665. `id` INT(11) NOT NULL AUTO_INCREMENT,
  666. `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:1-黑名单、2-白名单',
  667. `words` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '敏感词',
  668. PRIMARY KEY (`id`)
  669. ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='敏感词';
  670. -- ----------------------------
  671. -- Records of `sensitive_words`
  672. -- ----------------------------
  673. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'chacuo.com');
  674. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'chacuo.net');
  675. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '1766258.com');
  676. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '3202.com');
  677. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '4057.com');
  678. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '4059.com');
  679. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'a7996.com');
  680. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'bccto.me');
  681. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'bnuis.com');
  682. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'chaichuang.com');
  683. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'cr219.com');
  684. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'cuirushi.org');
  685. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'dawin.com');
  686. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'jiaxin8736.com');
  687. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'lakqs.com');
  688. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'urltc.com');
  689. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '027168.com');
  690. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '10minutemail.net');
  691. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '11163.com');
  692. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '1shivom.com');
  693. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'auoie.com');
  694. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'bareed.ws');
  695. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'bit-degree.com');
  696. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'cjpeg.com');
  697. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'cool.fr.nf');
  698. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'courriel.fr.nf');
  699. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'disbox.net');
  700. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'disbox.org');
  701. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'fidelium10.com');
  702. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'get365.pw');
  703. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'ggr.la');
  704. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'grr.la');
  705. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'guerrillamail.biz');
  706. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'guerrillamail.com');
  707. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'guerrillamail.de');
  708. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'guerrillamail.net');
  709. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'guerrillamail.org');
  710. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'guerrillamailblock.com');
  711. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'hubii-network.com');
  712. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'hurify1.com');
  713. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'itoup.com');
  714. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'jetable.fr.nf');
  715. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'jnpayy.com');
  716. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'juyouxi.com');
  717. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mail.bccto.me');
  718. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'www.bccto.me');
  719. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mega.zik.dj');
  720. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'moakt.co');
  721. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'moakt.ws');
  722. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'molms.com');
  723. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'moncourrier.fr.nf');
  724. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'monemail.fr.nf');
  725. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'monmail.fr.nf');
  726. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'nomail.xl.cx');
  727. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'nospam.ze.tc');
  728. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'pay-mon.com');
  729. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'poly-swarm.com');
  730. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'sgmh.online');
  731. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'sharklasers.com');
  732. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'shiftrpg.com');
  733. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'spam4.me');
  734. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'speed.1s.fr');
  735. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'tmail.ws');
  736. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'tmails.net');
  737. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'tmpmail.net');
  738. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'tmpmail.org');
  739. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'travala10.com');
  740. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'yopmail.com');
  741. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'yopmail.fr');
  742. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'yopmail.net');
  743. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'yuoia.com');
  744. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'zep-hyr.com');
  745. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'zippiex.com');
  746. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'lrc8.com');
  747. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '1otc.com');
  748. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'emailna.co');
  749. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mailinator.com');
  750. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'nbzmr.com');
  751. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'awsoo.com');
  752. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'zhcne.com');
  753. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '0box.eu');
  754. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'contbay.com');
  755. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'damnthespam.com');
  756. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'kurzepost.de');
  757. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'objectmail.com');
  758. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'proxymail.eu');
  759. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'rcpt.at');
  760. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trash-mail.at');
  761. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trashmail.at');
  762. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trashmail.com');
  763. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trashmail.io');
  764. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trashmail.me');
  765. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trashmail.net');
  766. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'wegwerfmail.de');
  767. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'wegwerfmail.net');
  768. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'wegwerfmail.org');
  769. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'nwytg.net');
  770. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'despam.it');
  771. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'spambox.us');
  772. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'spam.la');
  773. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mytrashmail.com');
  774. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mt2014.com');
  775. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mt2015.com');
  776. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'thankyou2010.com');
  777. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trash2009.com');
  778. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mt2009.com');
  779. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'trashymail.com');
  780. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'tempemail.net');
  781. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'slopsbox.com');
  782. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mailnesia.com');
  783. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'ezehe.com');
  784. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'tempail.com');
  785. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'newairmail.com');
  786. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'temp-mail.org');
  787. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'linshiyouxiang.net');
  788. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'zwoho.com');
  789. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'mailboxy.fun');
  790. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'crypto-net.club');
  791. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'guerrillamail.info');
  792. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'pokemail.net');
  793. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'odmail.cn');
  794. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'hlooy.com');
  795. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'ozlaq.com');
  796. insert into `sensitive_words` (`type`, `words`) VALUES ('1', '666email.com');
  797. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'linshiyou.com');
  798. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'linshiyou.pl');
  799. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'woyao.pl');
  800. insert into `sensitive_words` (`type`, `words`) VALUES ('1', 'yaowo.pl');
  801. insert into `sensitive_words` (`type`, `words`) VALUES ('2', 'qq.com');
  802. insert into `sensitive_words` (`type`, `words`) VALUES ('2', '163.com');
  803. insert into `sensitive_words` (`type`, `words`) VALUES ('2', '126.com');
  804. insert into `sensitive_words` (`type`, `words`) VALUES ('2', '189.com');
  805. insert into `sensitive_words` (`type`, `words`) VALUES ('2', 'sohu.com');
  806. insert into `sensitive_words` (`type`, `words`) VALUES ('2', 'gmail.com');
  807. insert into `sensitive_words` (`type`, `words`) VALUES ('2', 'outlook.com');
  808. insert into `sensitive_words` (`type`, `words`) VALUES ('2', 'icloud.com');
  809. -- ----------------------------
  810. -- Table structure for `user_subscribe`
  811. -- ----------------------------
  812. create TABLE `user_subscribe` (
  813. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  814. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  815. `code` char(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '订阅地址唯一识别码',
  816. `times` int(11) NOT NULL DEFAULT '0' COMMENT '地址请求次数',
  817. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态:0-禁用、1-启用',
  818. `ban_time` int(11) NOT NULL DEFAULT '0' COMMENT '封禁时间',
  819. `ban_desc` varchar(50) NOT NULL DEFAULT '' COMMENT '封禁理由',
  820. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  821. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  822. PRIMARY KEY (`id`),
  823. INDEX `user_id` (`user_id`, `status`),
  824. INDEX `code` (`code`)
  825. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户订阅';
  826. -- ----------------------------
  827. -- Records of `user_subscribe`
  828. -- ----------------------------
  829. insert into `user_subscribe` (`id`, `user_id`, `code`) VALUES ('1', '1', 'SsXa1');
  830. -- ----------------------------
  831. -- Table structure for `user_subscribe_log`
  832. -- ----------------------------
  833. create TABLE `user_subscribe_log` (
  834. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  835. `sid` int(11) DEFAULT NULL COMMENT '对应user_subscribe的id',
  836. `request_ip` char(128) DEFAULT NULL COMMENT '请求IP',
  837. `request_time` datetime DEFAULT NULL COMMENT '请求时间',
  838. `request_header` text COMMENT '请求头部信息',
  839. PRIMARY KEY (`id`),
  840. INDEX `sid` (`sid`)
  841. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户订阅访问日志';
  842. -- ----------------------------
  843. -- Table structure for `user_traffic_daily`
  844. -- ----------------------------
  845. create TABLE `user_traffic_daily` (
  846. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  847. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  848. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  849. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  850. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  851. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  852. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  853. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  854. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  855. PRIMARY KEY (`id`),
  856. INDEX `idx_user_node` (`user_id`,`node_id`) USING BTREE
  857. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户每日流量统计';
  858. -- ----------------------------
  859. -- Table structure for `user_traffic_hourly`
  860. -- ----------------------------
  861. create TABLE `user_traffic_hourly` (
  862. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  863. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  864. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID,0表示统计全部节点',
  865. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  866. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  867. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  868. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  869. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  870. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  871. PRIMARY KEY (`id`),
  872. INDEX `idx_user_node` (`user_id`,`node_id`) USING BTREE
  873. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户每小时流量统计';
  874. -- ----------------------------
  875. -- Table structure for `node_traffic_daily`
  876. -- ----------------------------
  877. create TABLE `ss_node_traffic_daily` (
  878. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  879. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  880. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  881. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  882. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  883. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  884. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  885. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  886. PRIMARY KEY (`id`),
  887. INDEX `idx_node_id` (`node_id`)
  888. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点每日流量统计';
  889. -- ----------------------------
  890. -- Table structure for `node_traffic_hourly`
  891. -- ----------------------------
  892. create TABLE `ss_node_traffic_hourly` (
  893. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  894. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  895. `u` bigint(20) NOT NULL DEFAULT '0' COMMENT '上传流量',
  896. `d` bigint(20) NOT NULL DEFAULT '0' COMMENT '下载流量',
  897. `total` bigint(20) NOT NULL DEFAULT '0' COMMENT '总流量',
  898. `traffic` varchar(255) DEFAULT '' COMMENT '总流量(带单位)',
  899. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  900. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  901. PRIMARY KEY (`id`),
  902. INDEX `idx_node_id` (`node_id`)
  903. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='节点每小时流量统计';
  904. -- ----------------------------
  905. -- Table structure for `user_ban_log`
  906. -- ----------------------------
  907. create TABLE `user_ban_log` (
  908. `id` int(11) NOT NULL AUTO_INCREMENT,
  909. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  910. `minutes` int(11) NOT NULL DEFAULT '0' COMMENT '封禁账号时长,单位分钟',
  911. `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '操作描述',
  912. `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未处理、1-已处理',
  913. `created_at` datetime DEFAULT NULL COMMENT '创建时间',
  914. `updated_at` datetime DEFAULT NULL COMMENT '最后更新时间',
  915. PRIMARY KEY (`id`)
  916. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户封禁日志';
  917. -- ----------------------------
  918. -- Table structure for `user_label`
  919. -- ----------------------------
  920. create TABLE `user_label` (
  921. `id` int(11) NOT NULL AUTO_INCREMENT,
  922. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  923. `label_id` int(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
  924. PRIMARY KEY (`id`),
  925. INDEX `idx_user_label` (`user_id`,`label_id`)
  926. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户标签';
  927. -- ----------------------------
  928. -- Table structure for `goods_label`
  929. -- ----------------------------
  930. create TABLE `goods_label` (
  931. `id` INT(11) NOT NULL AUTO_INCREMENT,
  932. `goods_id` INT(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
  933. `label_id` INT(11) NOT NULL DEFAULT '0' COMMENT '标签ID',
  934. PRIMARY KEY (`id`),
  935. INDEX `idx_goods_label` (`goods_id`, `label_id`)
  936. ) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品标签';
  937. -- ----------------------------
  938. -- Table structure for `country`
  939. -- ----------------------------
  940. create TABLE `country` (
  941. `id` int(11) NOT NULL AUTO_INCREMENT,
  942. `name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
  943. `code` varchar(10) NOT NULL DEFAULT '' COMMENT '代码',
  944. PRIMARY KEY (`id`)
  945. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='国家代码';
  946. -- ----------------------------
  947. -- Records of `country`
  948. -- ----------------------------
  949. insert into `country` VALUES ('1', '澳大利亚', 'au');
  950. insert into `country` VALUES ('2', '巴西', 'br');
  951. insert into `country` VALUES ('3', '加拿大', 'ca');
  952. insert into `country` VALUES ('4', '瑞士', 'ch');
  953. insert into `country` VALUES ('5', '中国', 'cn');
  954. insert into `country` VALUES ('6', '德国', 'de');
  955. insert into `country` VALUES ('7', '丹麦', 'dk');
  956. insert into `country` VALUES ('8', '埃及', 'eg');
  957. insert into `country` VALUES ('9', '法国', 'fr');
  958. insert into `country` VALUES ('10', '希腊', 'gr');
  959. insert into `country` VALUES ('11', '香港', 'hk');
  960. insert into `country` VALUES ('12', '印度尼西亚', 'id');
  961. insert into `country` VALUES ('13', '爱尔兰', 'ie');
  962. insert into `country` VALUES ('14', '以色列', 'il');
  963. insert into `country` VALUES ('15', '印度', 'in');
  964. insert into `country` VALUES ('16', '伊拉克', 'iq');
  965. insert into `country` VALUES ('17', '伊朗', 'ir');
  966. insert into `country` VALUES ('18', '意大利', 'it');
  967. insert into `country` VALUES ('19', '日本', 'jp');
  968. insert into `country` VALUES ('20', '韩国', 'kr');
  969. insert into `country` VALUES ('21', '墨西哥', 'mx');
  970. insert into `country` VALUES ('22', '马来西亚', 'my');
  971. insert into `country` VALUES ('23', '荷兰', 'nl');
  972. insert into `country` VALUES ('24', '挪威', 'no');
  973. insert into `country` VALUES ('25', '纽西兰', 'nz');
  974. insert into `country` VALUES ('26', '菲律宾', 'ph');
  975. insert into `country` VALUES ('27', '俄罗斯', 'ru');
  976. insert into `country` VALUES ('28', '瑞典', 'se');
  977. insert into `country` VALUES ('29', '新加坡', 'sg');
  978. insert into `country` VALUES ('30', '泰国', 'th');
  979. insert into `country` VALUES ('31', '土耳其', 'tr');
  980. insert into `country` VALUES ('32', '台湾', 'tw');
  981. insert into `country` VALUES ('33', '英国', 'uk');
  982. insert into `country` VALUES ('34', '美国', 'us');
  983. insert into `country` VALUES ('35', '越南', 'vn');
  984. insert into `country` VALUES ('36', '波兰', 'pl');
  985. insert into `country` VALUES ('37', '哈萨克斯坦', 'kz');
  986. insert into `country` VALUES ('38', '乌克兰', 'ua');
  987. insert into `country` VALUES ('39', '罗马尼亚', 'ro');
  988. insert into `country` VALUES ('40', '阿联酋', 'ae');
  989. insert into `country` VALUES ('41', '南非', 'za');
  990. insert into `country` VALUES ('42', '缅甸', 'mm');
  991. insert into `country` VALUES ('43', '冰岛', 'is');
  992. insert into `country` VALUES ('44', '芬兰', 'fi');
  993. insert into `country` VALUES ('45', '卢森堡', 'lu');
  994. insert into `country` VALUES ('46', '比利时', 'be');
  995. insert into `country` VALUES ('47', '保加利亚', 'bg');
  996. insert into `country` VALUES ('48', '立陶宛', 'lt');
  997. insert into `country` VALUES ('49', '哥伦比亚', 'co');
  998. insert into `country` VALUES ('50', '澳门', 'mo');
  999. insert into `country` VALUES ('51', '肯尼亚', 'ke');
  1000. insert into `country` VALUES ('52', '捷克', 'cz');
  1001. insert into `country` VALUES ('53', '摩尔多瓦', 'md');
  1002. insert into `country` VALUES ('54', '西班牙', 'es');
  1003. insert into `country` VALUES ('55', '巴基斯坦', 'pk');
  1004. insert into `country` VALUES ('56', '葡萄牙', 'pt');
  1005. insert into `country` VALUES ('57', '匈牙利', 'hu');
  1006. insert into `country` VALUES ('58', '阿根廷', 'ar');
  1007. -- ----------------------------
  1008. -- Table structure for `payment`
  1009. -- ----------------------------
  1010. create TABLE `payment` (
  1011. `id` int(11) NOT NULL AUTO_INCREMENT,
  1012. `sn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  1013. `user_id` int(11) NOT NULL COMMENT '用户ID',
  1014. `oid` int(11) DEFAULT NULL COMMENT '本地订单ID',
  1015. `amount` int(11) NOT NULL DEFAULT '0' COMMENT '金额,单位分',
  1016. `qr_code` text COLLATE utf8mb4_unicode_ci COMMENT '支付二维码',
  1017. `url` text COLLATE utf8mb4_unicode_ci COMMENT '支付链接',
  1018. `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态:-1-支付失败、0-等待支付、1-支付成功',
  1019. `created_at` datetime NOT NULL,
  1020. `updated_at` datetime NOT NULL,
  1021. PRIMARY KEY (`id`)
  1022. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='支付单';
  1023. -- ----------------------------
  1024. -- Table structure for `payment_callback`
  1025. -- ----------------------------
  1026. create TABLE `payment_callback` (
  1027. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1028. `client_id` varchar(50) DEFAULT NULL,
  1029. `yz_id` varchar(50) DEFAULT NULL,
  1030. `kdt_id` varchar(50) DEFAULT NULL,
  1031. `kdt_name` varchar(50) DEFAULT NULL,
  1032. `mode` tinyint(4) DEFAULT NULL,
  1033. `msg` text,
  1034. `sendCount` int(11) DEFAULT NULL,
  1035. `sign` varchar(32) DEFAULT NULL,
  1036. `status` varchar(30) DEFAULT NULL,
  1037. `test` tinyint(4) DEFAULT NULL,
  1038. `type` varchar(50) DEFAULT NULL,
  1039. `version` varchar(50) DEFAULT NULL,
  1040. `created_at` datetime DEFAULT NULL,
  1041. `updated_at` datetime DEFAULT NULL,
  1042. PRIMARY KEY (`id`)
  1043. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='回调日志';
  1044. -- ----------------------------
  1045. -- Table structure for `marketing`
  1046. -- ----------------------------
  1047. create TABLE `marketing` (
  1048. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1049. `type` TINYINT(4) NOT NULL COMMENT '类型:1-邮件群发、2-订阅渠道群发',
  1050. `receiver` TEXT NOT NULL COMMENT '接收者' COLLATE 'utf8mb4_unicode_ci',
  1051. `title` VARCHAR(255) NOT NULL COMMENT '标题' COLLATE 'utf8mb4_unicode_ci',
  1052. `content` TEXT NOT NULL COMMENT '内容' COLLATE 'utf8mb4_unicode_ci',
  1053. `error` VARCHAR(255) NULL COMMENT '错误信息' COLLATE 'utf8mb4_unicode_ci',
  1054. `status` TINYINT(4) NOT NULL COMMENT '状态:-1-失败、0-待发送、1-成功',
  1055. `created_at` datetime NOT NULL,
  1056. `updated_at` datetime NOT NULL,
  1057. PRIMARY KEY (`id`)
  1058. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='营销';
  1059. -- ----------------------------
  1060. -- Table structure for `user_login_log`
  1061. -- ----------------------------
  1062. create TABLE `user_login_log` (
  1063. `id` INT(11) NOT NULL AUTO_INCREMENT,
  1064. `user_id` INT(11) NOT NULL DEFAULT '0',
  1065. `ip` CHAR(128) NOT NULL,
  1066. `country` CHAR(20) NOT NULL,
  1067. `province` CHAR(20) NOT NULL,
  1068. `city` CHAR(20) NOT NULL,
  1069. `county` CHAR(20) NOT NULL,
  1070. `isp` CHAR(20) NOT NULL,
  1071. `area` CHAR(20) NOT NULL,
  1072. `created_at` datetime NOT NULL,
  1073. `updated_at` datetime NOT NULL,
  1074. PRIMARY KEY (`id`)
  1075. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户登录日志';
  1076. -- ----------------------------
  1077. -- Table structure for `ss_node_ip`
  1078. -- ----------------------------
  1079. create TABLE `ss_node_ip` (
  1080. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  1081. `node_id` int(11) NOT NULL DEFAULT '0' COMMENT '节点ID',
  1082. `user_id` INT(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
  1083. `port` int(11) NOT NULL DEFAULT '0' COMMENT '端口',
  1084. `type` char(10) NOT NULL DEFAULT 'tcp' COMMENT '类型:all、tcp、udp',
  1085. `ip` text COMMENT '连接IP:每个IP用,号隔开',
  1086. `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '上报时间',
  1087. PRIMARY KEY (`id`),
  1088. KEY `idx_port` (`port`),
  1089. KEY `idx_node` (`node_id`),
  1090. KEY `idx_user` (`user_id`)
  1091. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户连接IP';
  1092. -- ----------------------------
  1093. -- Table structure for `rule`
  1094. -- ----------------------------
  1095. create TABLE `rule` (
  1096. `id` INT(11) NOT NULL AUTO_INCREMENT,
  1097. `type` char(20) NOT NULL DEFAULT '0' COMMENT '类型:reg-正则表达式、domain-域名、ip-IP、protocol-协议',
  1098. `name` VARCHAR(100) NOT NULL COMMENT '规则描述',
  1099. `pattern` TEXT NOT NULL COMMENT '规则值',
  1100. `created_at` DATETIME NOT NULL,
  1101. `updated_at` DATETIME NOT NULL,
  1102. PRIMARY KEY (`id`)
  1103. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='审计规则';
  1104. -- ----------------------------
  1105. -- Records of `rule`
  1106. -- ----------------------------
  1107. insert into `rule` (`id`, `type`, `name`, `pattern`, `created_at`, `updated_at`) VALUES
  1108. (1, 'reg', '360', '(.*\.||)(^360|0360|1360|3600|360safe|^so|qhimg|qhmsg|^yunpan|qihoo|qhcdn|qhupdate|360totalsecurity|360shouji|qihucdn|360kan|secmp)\.(cn|com|net)', '2019-07-19 15:04:11', '2019-07-19 15:04:11'),
  1109. (2, 'reg', '腾讯管家', '(\.guanjia\.qq\.com|qqpcmgr|QQPCMGR)', '2019-07-19 15:04:11', '2019-07-19 15:04:11'),
  1110. (3, 'reg', '金山毒霸', '(.*\.||)(rising|kingsoft|duba|xindubawukong|jinshanduba)\.(com|net|org)', '2019-07-19 15:04:11', '2019-07-19 15:04:11'),
  1111. (4, 'reg', '暗网相关', '(.*\.||)(netvigator|torproject)\.(cn|com|net|org)', '2019-07-19 15:04:11', '2019-07-19 15:04:11'),
  1112. (5, 'reg', '百度定位', '(api|ps|sv|offnavi|newvector|ulog\\.imap|newloc|tracknavi)(\\.map|)\\.(baidu|n\\.shifen)\\.com', '2019-07-19 15:05:06', '2019-07-19 15:05:06'),
  1113. (6, 'reg', '法轮功类', '(.*\\.||)(dafahao|minghui|dongtaiwang|dajiyuan|falundata|shenyun|tuidang|epochweekly|epochtimes|ntdtv|falundafa|wujieliulan|zhengjian)\\.(org|com|net)', '2019-07-19 15:05:46', '2019-07-19 15:05:46'),
  1114. (7, 'reg', 'BT扩展名', '(torrent|\\.torrent|peer_id=|info_hash|get_peers|find_node|BitTorrent|announce_peer|announce\\.php\\?passkey=)', '2019-07-19 15:06:07', '2019-07-19 15:06:07'),
  1115. (8, 'reg', '邮件滥发', '((^.*\@)(guerrillamail|guerrillamailblock|sharklasers|grr|pokemail|spam4|bccto|chacuo|027168)\.(info|biz|com|de|net|org|me|la)|Subject|HELO|SMTP)', '2019-07-19 15:06:20', '2019-07-19 15:06:20'),
  1116. (9, 'reg', '迅雷下载', '(.?)(xunlei|sandai|Thunder|XLLiveUD)(.)', '2019-07-19 15:06:31', '2019-07-19 15:06:31'),
  1117. (10, 'reg', '大陆应用', '(.*\\.||)(qq|163|sohu|sogoucdn|sogou|uc|58|taobao)\\.(org|com|net|cn)', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
  1118. (11, 'reg', '大陆银行', '(.*\\.||)(icbc|ccb|boc|bankcomm|abchina|cmbchina|psbc|cebbank|cmbc|pingan|spdb|citicbank|cib|hxb|bankofbeijing|hsbank|tccb|4001961200|bosc|hkbchina|njcb|nbcb|lj-bank|bjrcb|jsbchina|gzcb|cqcbank|czbank|hzbank|srcb|cbhb|cqrcb|grcbank|qdccb|bocd|hrbcb|jlbank|bankofdl|qlbchina|dongguanbank|cscb|hebbank|drcbank|zzbank|bsb|xmccb|hljrcc|jxnxs|gsrcu|fjnx|sxnxs|gx966888|gx966888|zj96596|hnnxs|ahrcu|shanxinj|hainanbank|scrcu|gdrcu|hbxh|ynrcc|lnrcc|nmgnxs|hebnx|jlnls|js96008|hnnx|sdnxs)\\.(org|com|net|cn)', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
  1119. (12, 'reg', '台湾银行', '(.*\\.||)(firstbank|bot|cotabank|megabank|tcb-bank|landbank|hncb|bankchb|tbb|ktb|tcbbank|scsb|bop|sunnybank|kgibank|fubon|ctbcbank|cathaybk|eximbank|bok|ubot|feib|yuantabank|sinopac|esunbank|taishinbank|jihsunbank|entiebank|hwataibank|csc|skbank)\\.(org|com|net|tw)', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
  1120. (13, 'reg', '大陆第三方支付', '(.*\\.||)(alipay|baifubao|yeepay|99bill|95516|51credit|cmpay|tenpay|lakala|jdpay)\\.(org|com|net|cn)', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
  1121. (14, 'reg', '台湾特供', '(.*\.||)(visa|mycard|mastercard|gov|gash|beanfun|bank|line)\.(org|com|net|cn|tw|jp|kr)', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
  1122. (15, 'reg', '涉政治类', '(.*\\.||)(shenzhoufilm|secretchina|renminbao|aboluowang|mhradio|guangming|zhengwunet|soundofhope|yuanming|zhuichaguoji|fgmtv|xinsheng|shenyunperformingarts|epochweekly|tuidang|shenyun|falundata|bannedbook)\\.(org|com|net)', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
  1123. -- ----------------------------
  1124. -- Table structure for `rule_group`
  1125. -- ----------------------------
  1126. create TABLE `rule_group` (
  1127. `id` int(11) NOT NULL AUTO_INCREMENT,
  1128. `type` tinyint(4) DEFAULT '1' COMMENT '模式:1-阻断、2-仅放行',
  1129. `name` varchar(255) DEFAULT NULL COMMENT '分组名称',
  1130. `rules` text COMMENT '关联的规则ID,多个用,号分隔',
  1131. `nodes` text COMMENT '关联的节点ID,多个用,号分隔',
  1132. `created_at` datetime DEFAULT NULL,
  1133. `updated_at` datetime DEFAULT NULL,
  1134. PRIMARY KEY (`id`)
  1135. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='审计规则分组';
  1136. -- ----------------------------
  1137. -- Records of `rule_group`
  1138. -- ----------------------------
  1139. insert into `rule_group` (`id`, `type`, `name`, `rules`, `nodes`, `created_at`, `updated_at`) VALUES
  1140. (1, 1, '默认', '1,2,3,4,5,6,7,8,9,10,11,12,13,14', NULL, '2019-10-26 15:29:48', '2019-10-26 15:29:48');
  1141. -- ----------------------------
  1142. -- Table structure for `rule_group_node`
  1143. -- ----------------------------
  1144. create TABLE `device` (
  1145. `id` INT(11) NOT NULL AUTO_INCREMENT,
  1146. `type` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '类型:0-兼容、1-Shadowsocks(R)、2-V2Ray',
  1147. `platform` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '所属平台:0-其他、1-iOS、2-Android、3-Mac、4-Windows、5-Linux',
  1148. `name` VARCHAR(50) NOT NULL COMMENT '设备名称',
  1149. `status` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '状态:0-禁止订阅、1-允许订阅',
  1150. `header` VARCHAR(100) NOT NULL COMMENT '请求时头部的识别特征码',
  1151. PRIMARY KEY (`id`)
  1152. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='设备型号表';
  1153. -- ----------------------------
  1154. -- Records of `device`
  1155. -- ----------------------------
  1156. insert into `device` (`id`, `type`, `platform`, `name`, `status`, `header`) VALUES
  1157. (1, 1, 1, 'Quantumult', 1, 'Quantumult'),
  1158. (2, 1, 1, 'Shadowrocket', 1, 'Shadowrocket'),
  1159. (3, 1, 3, 'ShadowsocksX-NG-R', 1, 'ShadowsocksX-NG-R'),
  1160. (4, 1, 1, 'Pepi', 1, 'Pepi'),
  1161. (5, 1, 1, 'Potatso 2', 1, 'Potatso'),
  1162. (6, 1, 1, 'Potatso Lite', 1, 'Potatso'),
  1163. (7, 1, 4, 'ShadowsocksR', 1, 'ShadowsocksR'),
  1164. (8, 2, 4, 'V2RayW', 1, 'V2RayW'),
  1165. (9, 2, 4, 'V2RayN', 1, 'V2RayN'),
  1166. (10, 2, 4, 'V2RayS', 1, 'V2RayS'),
  1167. (11, 2, 4, 'Clash for Windows', 1, 'Clash'),
  1168. (12, 2, 3, 'V2RayX', 1, 'V2RayX'),
  1169. (13, 2, 3, 'V2RayU', 1, 'V2RayU'),
  1170. (14, 2, 3, 'V2RayC', 1, 'V2RayC'),
  1171. (15, 2, 3, 'ClashX', 1, 'ClashX'),
  1172. (16, 2, 1, 'Kitsunebi', 1, 'Kitsunebi'),
  1173. (17, 2, 1, 'Kitsunebi Lite', 1, 'Kitsunebi'),
  1174. (18, 2, 1, 'i2Ray', 1, 'i2Ray'),
  1175. (19, 2, 2, 'BifrostV', 1, 'BifrostV'),
  1176. (20, 2, 2, 'V2RayNG', 1, 'V2RayNG'),
  1177. (21, 2, 2, 'ShadowsocksR', 1, 'okhttp'),
  1178. (22, 2, 2, 'SSRR', 1, 'okhttp');
  1179. -- ----------------------------
  1180. -- Records of `failed_jobs`
  1181. -- ----------------------------
  1182. create TABLE `failed_jobs` (
  1183. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  1184. `connection` text NOT NULL,
  1185. `queue` text NOT NULL,
  1186. `payload` longtext NOT NULL,
  1187. `exception` longtext NOT NULL,
  1188. `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1189. PRIMARY KEY (`id`)
  1190. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='失败任务';
  1191. -- ----------------------------
  1192. -- Records of `jobs`
  1193. -- ----------------------------
  1194. create TABLE `jobs` (
  1195. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  1196. `queue` varchar(255) NOT NULL,
  1197. `payload` longtext NOT NULL,
  1198. `attempts` tinyint(3) unsigned NOT NULL,
  1199. `reserved_at` int(10) unsigned DEFAULT NULL,
  1200. `available_at` int(10) unsigned NOT NULL,
  1201. `created_at` int(10) unsigned NOT NULL,
  1202. PRIMARY KEY (`id`),
  1203. KEY `jobs_queue_index` (`queue`)
  1204. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='任务';
  1205. -- ----------------------------
  1206. -- Records of `migrations`
  1207. -- ----------------------------
  1208. create TABLE `migrations` (
  1209. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1210. `migration` varchar(255) NOT NULL,
  1211. `batch` int(11) NOT NULL,
  1212. PRIMARY KEY (`id`)
  1213. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='迁移';
  1214. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  1215. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  1216. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  1217. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  1218. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  1219. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;