spider_pre_v2_20260410_194440.sql 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. -- MySQL dump 10.13 Distrib 8.0.45, for Linux (x86_64)
  2. --
  3. -- Host: localhost Database: spider
  4. -- ------------------------------------------------------
  5. -- Server version 8.0.45
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!50503 SET NAMES utf8mb4 */;
  10. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Table structure for table `channels`
  18. --
  19. DROP TABLE IF EXISTS `channels`;
  20. /*!40101 SET @saved_cs_client = @@character_set_client */;
  21. /*!50503 SET character_set_client = utf8mb4 */;
  22. CREATE TABLE `channels` (
  23. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  24. `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  25. `title` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  26. `member_count` bigint DEFAULT '0',
  27. `about` text COLLATE utf8mb4_unicode_ci,
  28. `source` enum('seed','snowball','search','github') COLLATE utf8mb4_unicode_ci NOT NULL,
  29. `source_detail` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  30. `status` enum('pending','scraped','failed','skipped') COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  31. `last_message_id` bigint DEFAULT '0',
  32. `relevance_score` double DEFAULT NULL,
  33. `created_at` datetime(3) DEFAULT NULL,
  34. `updated_at` datetime(3) DEFAULT NULL,
  35. PRIMARY KEY (`id`),
  36. UNIQUE KEY `idx_channels_username` (`username`),
  37. KEY `idx_channels_source` (`source`),
  38. KEY `idx_channels_status` (`status`)
  39. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  40. /*!40101 SET character_set_client = @saved_cs_client */;
  41. --
  42. -- Dumping data for table `channels`
  43. --
  44. LOCK TABLES `channels` WRITE;
  45. /*!40000 ALTER TABLE `channels` DISABLE KEYS */;
  46. /*!40000 ALTER TABLE `channels` ENABLE KEYS */;
  47. UNLOCK TABLES;
  48. --
  49. -- Table structure for table `config_revisions`
  50. --
  51. DROP TABLE IF EXISTS `config_revisions`;
  52. /*!40101 SET @saved_cs_client = @@character_set_client */;
  53. /*!50503 SET character_set_client = utf8mb4 */;
  54. CREATE TABLE `config_revisions` (
  55. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  56. `setting_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  57. `old_value` text COLLATE utf8mb4_unicode_ci,
  58. `new_value` text COLLATE utf8mb4_unicode_ci,
  59. `changed_by` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT 'admin',
  60. `created_at` datetime(3) DEFAULT NULL,
  61. PRIMARY KEY (`id`),
  62. KEY `idx_config_revisions_setting_key` (`setting_key`)
  63. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  64. /*!40101 SET character_set_client = @saved_cs_client */;
  65. --
  66. -- Dumping data for table `config_revisions`
  67. --
  68. LOCK TABLES `config_revisions` WRITE;
  69. /*!40000 ALTER TABLE `config_revisions` DISABLE KEYS */;
  70. /*!40000 ALTER TABLE `config_revisions` ENABLE KEYS */;
  71. UNLOCK TABLES;
  72. --
  73. -- Table structure for table `managed_keywords`
  74. --
  75. DROP TABLE IF EXISTS `managed_keywords`;
  76. /*!40101 SET @saved_cs_client = @@character_set_client */;
  77. /*!50503 SET character_set_client = utf8mb4 */;
  78. CREATE TABLE `managed_keywords` (
  79. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  80. `keyword` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  81. `category` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  82. `status` enum('active','inactive') COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  83. `created_at` datetime(3) DEFAULT NULL,
  84. PRIMARY KEY (`id`),
  85. UNIQUE KEY `idx_managed_keywords_keyword` (`keyword`)
  86. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  87. /*!40101 SET character_set_client = @saved_cs_client */;
  88. --
  89. -- Dumping data for table `managed_keywords`
  90. --
  91. LOCK TABLES `managed_keywords` WRITE;
  92. /*!40000 ALTER TABLE `managed_keywords` DISABLE KEYS */;
  93. /*!40000 ALTER TABLE `managed_keywords` ENABLE KEYS */;
  94. UNLOCK TABLES;
  95. --
  96. -- Table structure for table `managed_seeds`
  97. --
  98. DROP TABLE IF EXISTS `managed_seeds`;
  99. /*!40101 SET @saved_cs_client = @@character_set_client */;
  100. /*!50503 SET character_set_client = utf8mb4 */;
  101. CREATE TABLE `managed_seeds` (
  102. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  103. `channel_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  104. `status` enum('active','inactive') COLLATE utf8mb4_unicode_ci DEFAULT 'active',
  105. `note` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  106. `created_at` datetime(3) DEFAULT NULL,
  107. `updated_at` datetime(3) DEFAULT NULL,
  108. PRIMARY KEY (`id`),
  109. UNIQUE KEY `idx_managed_seeds_channel_name` (`channel_name`)
  110. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  111. /*!40101 SET character_set_client = @saved_cs_client */;
  112. --
  113. -- Dumping data for table `managed_seeds`
  114. --
  115. LOCK TABLES `managed_seeds` WRITE;
  116. /*!40000 ALTER TABLE `managed_seeds` DISABLE KEYS */;
  117. /*!40000 ALTER TABLE `managed_seeds` ENABLE KEYS */;
  118. UNLOCK TABLES;
  119. --
  120. -- Table structure for table `managed_settings`
  121. --
  122. DROP TABLE IF EXISTS `managed_settings`;
  123. /*!40101 SET @saved_cs_client = @@character_set_client */;
  124. /*!50503 SET character_set_client = utf8mb4 */;
  125. CREATE TABLE `managed_settings` (
  126. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  127. `key_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  128. `value` text COLLATE utf8mb4_unicode_ci NOT NULL,
  129. `value_type` enum('int','float','bool','string','json') COLLATE utf8mb4_unicode_ci NOT NULL,
  130. `effect_level` enum('runtime','new_task') COLLATE utf8mb4_unicode_ci DEFAULT 'runtime',
  131. `description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  132. `updated_at` datetime(3) DEFAULT NULL,
  133. PRIMARY KEY (`id`),
  134. UNIQUE KEY `idx_managed_settings_key_name` (`key_name`)
  135. ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  136. /*!40101 SET character_set_client = @saved_cs_client */;
  137. --
  138. -- Dumping data for table `managed_settings`
  139. --
  140. LOCK TABLES `managed_settings` WRITE;
  141. /*!40000 ALTER TABLE `managed_settings` DISABLE KEYS */;
  142. INSERT INTO `managed_settings` VALUES (1,'pipeline.skip_phases','[]','json','new_task','默认跳过的阶段','2026-04-09 12:40:53.888'),(2,'pipeline.checkpoint_interval','30','int','runtime','进度上报间隔(秒)','2026-04-09 12:40:53.900'),(3,'tg_scraper.message_limit_per_channel','500','int','runtime','每频道最大消息数','2026-04-09 12:40:53.915'),(4,'tg_scraper.delay_per_message','1.0','float','runtime','消息间延迟(秒)','2026-04-09 12:40:53.925'),(5,'tg_scraper.delay_per_channel','5.0','float','runtime','频道间延迟(秒)','2026-04-09 12:40:53.934'),(6,'tg_scraper.delay_per_verify','3.0','float','runtime','验证间延迟(秒)','2026-04-09 12:40:53.944'),(7,'clean.timeout_seconds','3600','int','runtime','清洗阶段超时(秒)','2026-04-09 12:40:53.954'),(8,'search.timeout_seconds','3600','int','runtime','搜索阶段超时(秒)','2026-04-09 12:40:53.964'),(9,'snowball.max_channels_per_layer','200','int','runtime','每层最大频道数','2026-04-09 12:40:53.974'),(10,'snowball.max_channels_total','500','int','runtime','总最大频道数','2026-04-09 12:40:53.983'),(11,'tme_validator.enabled','true','bool','runtime','启用t.me死号预检','2026-04-09 12:40:53.993'),(12,'tme_validator.rate_per_min','60','int','runtime','预检限速(次/分)','2026-04-09 12:40:54.006'),(13,'tme_validator.concurrency','10','int','runtime','预检并发数','2026-04-09 12:40:54.015');
  143. /*!40000 ALTER TABLE `managed_settings` ENABLE KEYS */;
  144. UNLOCK TABLES;
  145. --
  146. -- Table structure for table `merchant_cleans`
  147. --
  148. DROP TABLE IF EXISTS `merchant_cleans`;
  149. /*!40101 SET @saved_cs_client = @@character_set_client */;
  150. /*!50503 SET character_set_client = utf8mb4 */;
  151. CREATE TABLE `merchant_cleans` (
  152. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  153. `raw_id` bigint unsigned DEFAULT NULL,
  154. `merchant_name` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  155. `tg_username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  156. `website` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  157. `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  158. `phone` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  159. `industry` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  160. `status` enum('valid','invalid','bot','duplicate','group') COLLATE utf8mb4_unicode_ci NOT NULL,
  161. `tg_first_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  162. `tg_last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  163. `is_premium` tinyint(1) DEFAULT '0',
  164. `last_online` datetime(3) DEFAULT NULL,
  165. `active_level` enum('active','moderate','inactive') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  166. `member_count` bigint DEFAULT '0',
  167. `quality_score` double DEFAULT '0',
  168. `source_count` bigint DEFAULT '1',
  169. `source_links` json DEFAULT NULL,
  170. `created_at` datetime(3) DEFAULT NULL,
  171. `updated_at` datetime(3) DEFAULT NULL,
  172. PRIMARY KEY (`id`),
  173. UNIQUE KEY `idx_merchant_cleans_tg_username` (`tg_username`),
  174. KEY `idx_merchant_cleans_raw_id` (`raw_id`),
  175. KEY `idx_merchant_cleans_industry` (`industry`),
  176. KEY `idx_merchant_cleans_status` (`status`),
  177. KEY `idx_merchant_cleans_quality_score` (`quality_score`)
  178. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  179. /*!40101 SET character_set_client = @saved_cs_client */;
  180. --
  181. -- Dumping data for table `merchant_cleans`
  182. --
  183. LOCK TABLES `merchant_cleans` WRITE;
  184. /*!40000 ALTER TABLE `merchant_cleans` DISABLE KEYS */;
  185. /*!40000 ALTER TABLE `merchant_cleans` ENABLE KEYS */;
  186. UNLOCK TABLES;
  187. --
  188. -- Table structure for table `merchant_raws`
  189. --
  190. DROP TABLE IF EXISTS `merchant_raws`;
  191. /*!40101 SET @saved_cs_client = @@character_set_client */;
  192. /*!50503 SET character_set_client = utf8mb4 */;
  193. CREATE TABLE `merchant_raws` (
  194. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  195. `merchant_name` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  196. `tg_username` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  197. `website` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  198. `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  199. `phone` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  200. `industry` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  201. `source_type` enum('tg_scrape','web_crawl','github') COLLATE utf8mb4_unicode_ci NOT NULL,
  202. `source_id` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  203. `original_message` text COLLATE utf8mb4_unicode_ci,
  204. `status` enum('raw','glm_parsed') COLLATE utf8mb4_unicode_ci DEFAULT 'raw',
  205. `created_at` datetime(3) DEFAULT NULL,
  206. PRIMARY KEY (`id`),
  207. KEY `idx_merchant_raws_tg_username` (`tg_username`),
  208. KEY `idx_merchant_raws_status` (`status`)
  209. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  210. /*!40101 SET character_set_client = @saved_cs_client */;
  211. --
  212. -- Dumping data for table `merchant_raws`
  213. --
  214. LOCK TABLES `merchant_raws` WRITE;
  215. /*!40000 ALTER TABLE `merchant_raws` DISABLE KEYS */;
  216. /*!40000 ALTER TABLE `merchant_raws` ENABLE KEYS */;
  217. UNLOCK TABLES;
  218. --
  219. -- Table structure for table `nav_sites`
  220. --
  221. DROP TABLE IF EXISTS `nav_sites`;
  222. /*!40101 SET @saved_cs_client = @@character_set_client */;
  223. /*!50503 SET character_set_client = utf8mb4 */;
  224. CREATE TABLE `nav_sites` (
  225. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  226. `url` varchar(2048) COLLATE utf8mb4_unicode_ci NOT NULL,
  227. `domain` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  228. `source` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  229. `status` enum('pending','scraped','filtered','failed') COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  230. `filter_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  231. `merchant_count` bigint DEFAULT '0',
  232. `created_at` datetime(3) DEFAULT NULL,
  233. PRIMARY KEY (`id`),
  234. UNIQUE KEY `idx_url` (`url`(500)),
  235. KEY `idx_nav_sites_domain` (`domain`),
  236. KEY `idx_nav_sites_status` (`status`)
  237. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  238. /*!40101 SET character_set_client = @saved_cs_client */;
  239. --
  240. -- Dumping data for table `nav_sites`
  241. --
  242. LOCK TABLES `nav_sites` WRITE;
  243. /*!40000 ALTER TABLE `nav_sites` DISABLE KEYS */;
  244. /*!40000 ALTER TABLE `nav_sites` ENABLE KEYS */;
  245. UNLOCK TABLES;
  246. --
  247. -- Table structure for table `tasks`
  248. --
  249. DROP TABLE IF EXISTS `tasks`;
  250. /*!40101 SET @saved_cs_client = @@character_set_client */;
  251. /*!50503 SET character_set_client = utf8mb4 */;
  252. CREATE TABLE `tasks` (
  253. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  254. `task_type` enum('full','discover','search','github','scrape','crawl','clean','score') COLLATE utf8mb4_unicode_ci NOT NULL,
  255. `status` enum('pending','running','completed','failed','stopped') COLLATE utf8mb4_unicode_ci DEFAULT 'pending',
  256. `params` json DEFAULT NULL,
  257. `progress` json DEFAULT NULL,
  258. `result` json DEFAULT NULL,
  259. `error_msg` text COLLATE utf8mb4_unicode_ci,
  260. `started_at` datetime(3) DEFAULT NULL,
  261. `finished_at` datetime(3) DEFAULT NULL,
  262. `created_at` datetime(3) DEFAULT NULL,
  263. PRIMARY KEY (`id`),
  264. KEY `idx_tasks_task_type` (`task_type`),
  265. KEY `idx_tasks_status` (`status`)
  266. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  267. /*!40101 SET character_set_client = @saved_cs_client */;
  268. --
  269. -- Dumping data for table `tasks`
  270. --
  271. LOCK TABLES `tasks` WRITE;
  272. /*!40000 ALTER TABLE `tasks` DISABLE KEYS */;
  273. INSERT INTO `tasks` VALUES (1,'full','completed','{\"target\": \"\", \"test_run\": {\"item_limit\": 10, \"message_limit\": 100}, \"task_type\": \"full\", \"skip_phases\": null}',NULL,'{\"message\": \"task completed successfully\"}','','2026-04-09 12:44:49.753','2026-04-09 12:44:50.501','2026-04-09 12:44:49.733'),(2,'score','completed','{\"target\": \"\", \"test_run\": {\"item_limit\": 5, \"message_limit\": 10}, \"task_type\": \"score\", \"skip_phases\": null}',NULL,'{\"message\": \"task completed successfully\"}','','2026-04-09 13:10:50.991','2026-04-09 13:10:51.008','2026-04-09 13:10:50.402'),(3,'score','completed','{\"target\": \"\", \"test_run\": {\"item_limit\": 5, \"message_limit\": 10}, \"task_type\": \"score\", \"skip_phases\": null}',NULL,'{\"message\": \"task completed successfully\"}','','2026-04-09 13:10:56.222','2026-04-09 13:10:56.238','2026-04-09 13:10:55.281'),(4,'score','completed','{\"target\": \"\", \"test_run\": {\"item_limit\": 5, \"message_limit\": 10}, \"task_type\": \"score\", \"skip_phases\": null}',NULL,'{\"message\": \"task completed successfully\"}','','2026-04-09 13:20:42.118','2026-04-09 13:20:42.132','2026-04-09 13:20:42.031'),(5,'discover','completed','{\"target\": \"\", \"test_run\": {\"item_limit\": 10, \"message_limit\": 100}, \"task_type\": \"discover\", \"skip_phases\": null}',NULL,'{\"message\": \"task completed successfully\"}','','2026-04-09 13:36:20.604','2026-04-09 13:36:20.626','2026-04-09 13:36:19.601');
  274. /*!40000 ALTER TABLE `tasks` ENABLE KEYS */;
  275. UNLOCK TABLES;
  276. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  277. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  278. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  279. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  280. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  281. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  282. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  283. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  284. -- Dump completed on 2026-04-10 11:44:41