db.sql 55 KB

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