-- 插入一些论坛板块数据
INSERT INTO `forums` (`slug`, `name`, `description`, `parent_id`, `sort_order`, `is_locked`) VALUES
                                                                                                 ('general', '综合讨论区', '这里是综合讨论区，讨论各种话题', NULL, 1, FALSE),
                                                                                                 ('technology', '技术讨论区', '专注技术的讨论区，分享技术资源', NULL, 2, FALSE),
                                                                                                 ('gaming', '游戏讨论区', '这里是游戏爱好者的天地', NULL, 3, FALSE),
                                                                                                 ('movies', '电影讨论区', '讨论最新电影与经典影片', NULL, 4, FALSE);


-- 插入一些标签数据
INSERT INTO `forum_tags` (`name`, `color`) VALUES
                                               ('Java', '#f44336'),
                                               ('Spring Boot', '#4caf50'),
                                               ('MySQL', '#ff9800'),
                                               ('React', '#2196f3'),
                                               ('Gaming', '#9c27b0'),
                                               ('Movies', '#03a9f4');

-- 插入一些用户数据
INSERT INTO `users` (`email`, `password`, `username`, `group_id`, `passkey`, `create_at`, `avatar`, `custom_title`, `signature`, `language`, `download_bandwidth`, `upload_bandwidth`, `downloaded`, `uploaded`, `real_downloaded`, `real_uploaded`, `isp`, `karma`, `invite_slot`, `seeding_time`, `personal_access_token`, `privacy_level`) VALUES
                                                                                                                                                                                                                                                                                                                                                  ('john.doe@example.com', '$2a$12$KqN2gNzfHdtXTXV1JErmuI6N5b8R75Afj6mEXZkLGRn8epbOT6bmq', 'john_doe', 1, 'c9f5e2b3-13a1-456b-92ec-32145b4a1a7e', '2025-06-01 10:00:00', 'https://www.example.com/avatar1.jpg', '论坛用户', '这个人很懒，什么都没有写', 'en-US', '100mbps', '50mbps', 12345, 67890, 12345, 67890, 'Unknown ISP', 100.00, 5, 0, 'abcdef123456', '0'),
                                                                                                                                                                                                                                                                                                                                                  ('jane.doe@example.com', '$2a$12$EYh8kLRWxOEmjxjXb.8j2uev9wWjl1zDbb2u5ckT6eBqqZnFYvNY6', 'jane_doe', 2, 'bd9e7a7a-519e-4d3e-bf0b-d9145a61cfb7', '2025-06-01 11:00:00', 'https://www.example.com/avatar2.jpg', '高级用户', '喜欢探索各种技术，沉迷于编程', 'zh-CN', '1gbps', '200mbps', 10000, 50000, 10000, 50000, 'China Telecom', 150.00, 10, 100, 'abcdef654321', '1');

-- 插入一些帖子主题数据
INSERT INTO `topics` (`forum_id`, `user_id`, `title`, `is_pinned`, `is_locked`, `created_at`, `updated_at`) VALUES
                                                                                                                (1, 1, '欢迎来到综合讨论区', FALSE, FALSE, '2025-06-01 12:00:00', '2025-06-01 12:30:00'),
                                                                                                                (2, 2, 'Spring Boot 介绍与实战', TRUE, FALSE, '2025-06-02 10:00:00', '2025-06-02 10:10:00'),
                                                                                                                (3, 1, '有哪些好玩的游戏推荐？', FALSE, FALSE, '2025-06-02 11:00:00', '2025-06-02 11:05:00'),
                                                                                                                (4, 2, '最近看过的电影推荐', FALSE, TRUE, '2025-06-02 12:00:00', '2025-06-02 12:15:00');

-- 插入一些帖子内容数据
INSERT INTO `posts` (`topic_id`, `user_id`, `content`, `created_at`, `updated_at`) VALUES
                                                                                       (1, 1, '欢迎大家来到综合讨论区，大家可以自由讨论各种话题。', '2025-06-01 12:10:00', '2025-06-01 12:10:00'),
                                                                                       (2, 2, 'Spring Boot 是一个非常流行的 Java 开发框架，它大大简化了开发流程。', '2025-06-02 10:05:00', '2025-06-02 10:05:00'),
                                                                                       (3, 1, '最近玩了很多游戏，强烈推荐《赛博朋克 2077》。', '2025-06-02 11:02:00', '2025-06-02 11:02:00'),
                                                                                       (4, 2, '《复仇者联盟4》真是一个巨大的电影爆发，强烈推荐！', '2025-06-02 12:05:00', '2025-06-02 12:05:00');

-- 插入一些帖子点赞数据
INSERT INTO `post_likes` (`user_id`, `post_id`, `created_at`) VALUES
                                                                  (1, 1, '2025-06-01 12:20:00'),
                                                                  (2, 2, '2025-06-02 10:10:00'),
                                                                  (1, 3, '2025-06-02 11:10:00'),
                                                                  (2, 4, '2025-06-02 12:10:00');

-- 插入一些标签数据
INSERT INTO `topic_tags` (`topic_id`, `tag_id`) VALUES
                                                    (1, 1),
                                                    (2, 2),
                                                    (3, 3),
                                                    (4, 4);

-- 插入一些浏览记录数据
INSERT INTO `topic_views` (`topic_id`, `user_id`, `last_viewed_at`) VALUES
                                                                        (1, 1, '2025-06-01 12:10:00'),
                                                                        (2, 2, '2025-06-02 10:05:00'),
                                                                        (3, 1, '2025-06-02 11:05:00'),
                                                                        (4, 2, '2025-06-02 12:05:00');

-- 插入一些用户关注的帖子数据
INSERT INTO `topic_subscriptions` (`user_id`, `topic_id`, `subscribed_at`) VALUES
                                                                               (1, 1, '2025-06-01 12:15:00'),
                                                                               (2, 2, '2025-06-02 10:15:00'),
                                                                               (1, 3, '2025-06-02 11:15:00'),
                                                                               (2, 4, '2025-06-02 12:15:00');

-- 插入一些用户论坛活动记录数据
INSERT INTO `user_forum_history` (`user_id`, `type`, `target_id`, `created_at`) VALUES
                                                                                    (1, 'topic', 1, '2025-06-01 12:00:00'),
                                                                                    (2, 'topic', 2, '2025-06-02 10:00:00'),
                                                                                    (1, 'reply', 1, '2025-06-01 12:10:00'),
                                                                                    (2, 'reply', 2, '2025-06-02 10:05:00');
