db.sql 59 KB

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