/*
 Navicat Premium Dump SQL

 Source Server         : 8.0.12_mysql
 Source Server Type    : MySQL
 Source Server Version : 80012 (8.0.12)
 Source Host           : 192.168.2.183:3308
 Source Schema         : spam_nb_miniapp

 Target Server Type    : MySQL
 Target Server Version : 80012 (8.0.12)
 File Encoding         : 65001

 Date: 22/04/2026 23:17:44
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for content_posts
-- ----------------------------
DROP TABLE IF EXISTS `content_posts`;
CREATE TABLE `content_posts`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `recipient_user_id` int(11) NULL DEFAULT NULL,
  `text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `visibility` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `prediction` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
  `spam_probability` float NOT NULL,
  `ham_probability` float NOT NULL,
  `confidence` float NOT NULL,
  `threshold` float NOT NULL,
  `reason_tokens` json NULL,
  `model_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `manual_review_status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `manual_review_by` int(11) NULL DEFAULT NULL,
  `manual_review_note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `manual_review_at` datetime NULL DEFAULT NULL,
  `appeal_status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `appeal_reason_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '快捷申诉理由类型',
  `appeal_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `appeal_evidence_urls` json NULL COMMENT '证据图片URL列表',
  `appeal_admin_note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `appeal_submitted_at` datetime NULL DEFAULT NULL,
  `appeal_processed_at` datetime NULL DEFAULT NULL,
  `appeal_processed_by` int(11) NULL DEFAULT NULL,
  `created_at` datetime NULL DEFAULT NULL,
  `updated_at` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manual_review_by`(`manual_review_by` ASC) USING BTREE,
  INDEX `appeal_processed_by`(`appeal_processed_by` ASC) USING BTREE,
  INDEX `ix_content_posts_created_at`(`created_at` ASC) USING BTREE,
  INDEX `ix_content_posts_user_id`(`user_id` ASC) USING BTREE,
  INDEX `ix_content_posts_recipient_user_id`(`recipient_user_id` ASC) USING BTREE,
  CONSTRAINT `content_posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `content_posts_ibfk_2` FOREIGN KEY (`recipient_user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `content_posts_ibfk_3` FOREIGN KEY (`manual_review_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `content_posts_ibfk_4` FOREIGN KEY (`appeal_processed_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of content_posts
-- ----------------------------

-- ----------------------------
-- Table structure for detection_configs
-- ----------------------------
DROP TABLE IF EXISTS `detection_configs`;
CREATE TABLE `detection_configs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `spam_threshold` float NOT NULL,
  `updated_by` int(11) NULL DEFAULT NULL,
  `updated_at` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `updated_by`(`updated_by` ASC) USING BTREE,
  CONSTRAINT `detection_configs_ibfk_1` FOREIGN KEY (`updated_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of detection_configs
-- ----------------------------
INSERT INTO `detection_configs` VALUES (1, 0.75, NULL, '2026-04-21 14:41:44');

-- ----------------------------
-- Table structure for spam_prediction_logs
-- ----------------------------
DROP TABLE IF EXISTS `spam_prediction_logs`;
CREATE TABLE `spam_prediction_logs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `prediction` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
  `spam_probability` float NOT NULL,
  `ham_probability` float NOT NULL,
  `confidence` float NOT NULL,
  `reason_tokens` json NULL,
  `model_version` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `created_at` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ix_spam_prediction_logs_created_at`(`created_at` ASC) USING BTREE,
  INDEX `ix_spam_prediction_logs_user_id`(`user_id` ASC) USING BTREE,
  CONSTRAINT `spam_prediction_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of spam_prediction_logs
-- ----------------------------
INSERT INTO `spam_prediction_logs` VALUES (1, 1, '大家好，今晚 8 点社区线上读书会，欢迎参加。', 'ham', '', 0.1688, 0.8312, 0.8312, '[\"今\", \"好\", \"会\", \"晚\", \"好，\"]', 'nb-6ec632453424290f', '2026-04-21 14:48:42');
INSERT INTO `spam_prediction_logs` VALUES (2, 1, '恭喜中奖领取大额现金，点击链接立即到账。', 'spam', '', 0.9679, 0.0321, 0.9679, '[{\"token\": \"立\", \"weight\": 1.3951}, {\"token\": \"领\", \"weight\": 1.3879}, {\"token\": \"即\", \"weight\": 1.3423}, {\"token\": \"取\", \"weight\": 1.2808}, {\"token\": \"立即\", \"weight\": 1.2778}]', 'nb-6ec632453424290f', '2026-04-21 14:54:30');
INSERT INTO `spam_prediction_logs` VALUES (3, 1, '哈哈哈哈哈', 'ham', '', 0.4923, 0.5077, 0.5077, '[]', 'nb-6ec632453424290f', '2026-04-21 15:30:44');
INSERT INTO `spam_prediction_logs` VALUES (4, 1, '季姬击鸡记', 'spam', '', 0.6253, 0.3747, 0.6253, '[{\"token\": \"击\", \"weight\": 1.2081}, {\"token\": \"记\", \"weight\": 0.397}, {\"token\": \"季\", \"weight\": -0.3778}]', 'nb-6ec632453424290f', '2026-04-21 15:30:44');
INSERT INTO `spam_prediction_logs` VALUES (5, 1, '鸡鸡棒', 'ham', '', 0.4923, 0.5077, 0.5077, '[]', 'nb-6ec632453424290f', '2026-04-21 15:30:44');
INSERT INTO `spam_prediction_logs` VALUES (6, 1, '本周活动报名已开放，请在群里接龙。', 'ham', '', 0.3055, 0.6945, 0.6945, '[{\"token\": \"已\", \"weight\": -1.1662}, {\"token\": \"周\", \"weight\": -1.0385}, {\"token\": \"报\", \"weight\": -0.9614}, {\"token\": \"本\", \"weight\": -0.945}, {\"token\": \"动\", \"weight\": 0.8401}]', 'nb-6ec632453424290f', '2026-04-22 13:17:08');
INSERT INTO `spam_prediction_logs` VALUES (7, 1, '高薪兼职日结，扫码进群立刻赚钱。', 'spam', 'harassment', 0.8926, 0.1074, 0.8926, '[{\"token\": \"立\", \"weight\": 1.3951}, {\"token\": \"赚\", \"weight\": 0.6924}, {\"token\": \"进群\", \"weight\": 0.6553}, {\"token\": \"扫\", \"weight\": 0.6547}, {\"token\": \"扫码\", \"weight\": 0.6547}]', 'nb-6ec632453424290f', '2026-04-22 13:17:22');

-- ----------------------------
-- Table structure for spam_training_samples
-- ----------------------------
DROP TABLE IF EXISTS `spam_training_samples`;
CREATE TABLE `spam_training_samples`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `label` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `source` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `created_by` int(11) NULL DEFAULT NULL,
  `is_active` tinyint(1) NULL DEFAULT NULL,
  `created_at` datetime NULL DEFAULT NULL,
  `updated_at` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ix_spam_training_samples_created_by`(`created_by` ASC) USING BTREE,
  INDEX `ix_spam_training_samples_label`(`label` ASC) USING BTREE,
  CONSTRAINT `spam_training_samples_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 66 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of spam_training_samples
-- ----------------------------
INSERT INTO `spam_training_samples` VALUES (1, '尊敬的用户，您已获赠100元话费，点击链接立即到账', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (2, '本周五下午两点进行季度复盘，请准时参加', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (3, '最后3个名额，免费领取手机一台，回复1立即领取', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (4, '您好，合同已发送到邮箱，请查收并反馈修改意见', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (5, '你的快递因地址异常被退回，点击网址重新填写', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (6, '明天出差高铁票已订好，车次信息已同步到群里', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (7, '恭喜你成为平台幸运粉丝，马上领现金红包', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (8, '研发环境今晚22点维护，预计30分钟恢复', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (9, '内部渠道兼职，日结500，添加微信了解详情', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (10, '周报模板已更新，请使用新模板提交', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (11, '低价出售苹果手机，全新未拆封，先到先得', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (12, '客户反馈文档在共享盘，路径已发你私聊', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (13, '紧急通知：你的银行卡存在风险，请立即验证', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (14, '今天的日报我已补充到项目看板', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (15, '官方补贴发放中，输入验证码即可领取', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (16, '下午四点产品评审，麻烦准备交互稿', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (17, '无需面试，高薪在家办公，扫码进群', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (18, '发票已开具完成，纸质件今天寄出', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (19, '您的贷款已通过，点击查看额度', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (20, '会议纪要我整理好了，已上传飞书文档', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (21, '双十一秒杀提前抢，点此领隐藏优惠券', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (22, '新同事今天入职，请大家中午一起欢迎', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (23, '你有一笔退款待确认，马上处理避免失效', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (24, '设计稿第二版我已经按你建议调整完了', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (25, '点击领取年度会员，原价699现价9.9', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (26, '明天早会由我来同步上线计划', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (27, '官方通知：账号异常将被冻结，请立即解封', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (28, '请把测试环境数据库备份到指定目录', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (29, '刷单项目火热招募，宝妈学生都能做', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (30, '你发的需求我已经拆分成开发任务', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (31, '中奖通知：你获得平板电脑一台，限时领取', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (32, '客户明天下午三点会远程验收新功能', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (33, '陌生链接请勿泄露验证码，谨防被骗', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (34, '马上关注公众号领取无门槛现金券', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (35, '今天的构建失败是依赖冲突，我在修复', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (36, '免费领取课程资料，扫码后自动发放', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (37, '请确认一下下周排期是否需要调整', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (38, '特惠机票内部价，回复姓名立刻锁座', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (39, '我已经把版本回滚流程补充到Wiki', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (40, '贷款秒批到账，额度最高20万', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (41, '合同法务意见已返回，请你二次确认', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (42, '限时返现活动，点击进入马上到账', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (43, '这个bug我复现到了，定位在缓存层', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (44, '你有新的违章信息，点开链接立即处理', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (45, '早上好，今天先做性能压测再发版', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (46, '邀请码最后1小时有效，错过不再补发', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (47, '中午12点在会议室A开需求评审会', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (48, '苹果14只要1999，货到付款保真', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (49, '供应商报价单已更新到共享文件夹', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (50, '想赚外快吗？加我秒赚零花钱', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (51, '今天下午我去客户现场，晚些回公司', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (52, '官方补贴计划启动，名额有限速来登记', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (53, '测试报告已发你邮箱，包含复现步骤', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (54, '欠费停机提醒，立即充值恢复使用', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (55, '这个接口我加了幂等，避免重复提交', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (56, '点击抽取盲盒大奖，百分百中奖', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (57, '版本发布说明我已经整理成公告', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (58, '独家内部消息，股票必涨，速进群', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (59, '周一上午需要和财务对齐预算数据', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (60, '紧急！你的社保账户异常，立即核验', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (61, '我下午会把接口文档补全到OpenAPI', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (62, '游戏皮肤免费领，输入手机号立刻到账', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (63, '晚上的培训链接我刚刚发到部门群', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (64, '预约体检补贴开通，点击立即申请', 'spam', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');
INSERT INTO `spam_training_samples` VALUES (65, '新需求优先级调高了，请先排进本周', 'ham', 'seed', NULL, 1, '2026-04-21 14:41:44', '2026-04-21 14:41:44');

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `password_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `company` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `is_admin` tinyint(1) NULL DEFAULT NULL,
  `credit_score` int(11) NULL DEFAULT 100 COMMENT '用户信誉分（0-200，默认100）',
  `created_at` datetime NULL DEFAULT NULL,
  `updated_at` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `ix_users_username`(`username` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of users
-- ----------------------------
INSERT INTO `users` VALUES (1, 'admin', 'scrypt:32768:8:1$7CMYgcG40rYR9VdJ$f65c7ea91736f37c5a2522ac8c0f3fe18dab047dba8b6bf88c789d3da97bd91115225620e2e3eb93ed684f8720bfa09e30cd09599ba708670ddb2738801030fe', '系统管理员', '', '', '', 1, 99, '2026-04-21 14:41:44', '2026-04-22 13:17:22');

SET FOREIGN_KEY_CHECKS = 1;
