db.sql 58 KB

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