37 lines
4.0 KiB
SQL
37 lines
4.0 KiB
SQL
-- 校园活动组织与报名系统 - 示例数据
|
||
-- 执行前请确保已运行 init.sql 创建数据库和表结构
|
||
|
||
USE `campus_activity`;
|
||
|
||
-- 插入测试管理员账号(密码:admin123,BCrypt加密)
|
||
INSERT INTO `user` (`username`, `password`, `name`, `role`) VALUES
|
||
('admin', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '系统管理员', 1);
|
||
|
||
-- ============================================
|
||
-- 1. 插入示例学生账户(密码:123456)
|
||
-- ============================================
|
||
-- 密码 "123456" 的 BCrypt 加密值
|
||
INSERT INTO `user` (`username`, `password`, `name`, `student_id`, `email`, `phone`, `role`, `status`) VALUES
|
||
('student01', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生一', '2024001', 'zhangsan@example.com', '13800138001', 0, 1),
|
||
('student02', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生二', '2024002', 'lisi@example.com', '13800138002', 0, 1),
|
||
('student03', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生三', '2024003', 'wangwu@example.com', '13800138003', 0, 1),
|
||
('student04', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生四', '2024004', 'zhaoliu@example.com', '13800138004', 0, 1),
|
||
('student05', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生五', '2024005', 'sunqi@example.com', '13800138005', 0, 1),
|
||
('student06', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生六', '2024006', 'zhouba@example.com', '13800138006', 0, 1),
|
||
('student07', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生七', '2024007', 'wujiu@example.com', '13800138007', 0, 1),
|
||
('student08', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生八', '2024008', 'zhengshi@example.com', '13800138008', 0, 1),
|
||
('student09', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生九', '2024009', 'chenshiyi@example.com', '13800138009', 0, 1),
|
||
('student10', '$2a$10$WxboxtWwPqb1un4nQV/O7e59sZFbZbc7tr1MmBDHhgGYbFGtg3ypi', '学生十', '2024010', 'liushier@example.com', '13800138010', 0, 1);
|
||
|
||
-- ============================================
|
||
-- 2. 插入示例活动数据
|
||
-- ============================================
|
||
INSERT INTO `activity` (`title`, `description`, `cover_image`, `start_time`, `end_time`, `registration_deadline`, `location`, `max_participants`, `current_participants`, `status`, `category`, `admin_id`) VALUES
|
||
('科技创新大赛', '校园年度科技创新大赛,展示学生创新成果,激发创新热情', '', '2026-01-15 09:00:00', '2026-01-15 17:00:00', '2026-01-14 23:59:59', '学术报告厅', 100, 0, 1, '科技竞赛', 1),
|
||
('校园歌手大赛', '展示青春风采,唱响校园旋律', '', '2026-01-20 19:00:00', '2026-01-20 22:00:00', '2026-01-19 18:00:00', '大学生活动中心', 300, 0, 1, '文艺娱乐', 1),
|
||
('编程马拉松', '48小时极限编程挑战,团队协作完成创新项目', '', '2026-01-25 09:00:00', '2026-01-27 09:00:00', '2026-01-23 23:59:59', '计算机学院实验室', 50, 0, 1, '科技竞赛', 1),
|
||
('读书分享会', '分享阅读心得,交流思想感悟', '', '2026-01-18 14:00:00', '2026-01-18 16:30:00', '2026-01-17 12:00:00', '图书馆报告厅', 80, 0, 1, '学术讲座', 1),
|
||
('篮球友谊赛', '增进友谊,强健体魄,展现体育精神', '', '2026-01-22 16:00:00', '2026-01-22 18:00:00', '2026-01-21 12:00:00', '体育馆', 40, 0, 1, '体育活动', 1),
|
||
('创业讲座', '邀请成功企业家分享创业经验', '', '2026-01-28 14:00:00', '2026-01-28 17:00:00', '2026-01-27 12:00:00', '商学院报告厅', 150, 0, 1, '学术讲座', 1),
|
||
('摄影展', '展示校园风光,记录美好瞬间', '', '2026-01-30 09:00:00', '2026-01-31 18:00:00', '2026-01-29 12:00:00', '艺术楼展厅', 200, 0, 1, '文艺娱乐', 1),
|
||
('英语角活动', '提升英语口语能力,结交志同道合的朋友', '', '2026-01-16 19:00:00', '2026-01-16 21:00:00', '2026-01-15 18:00:00', '外语学院活动室', 30, 0, 1, '学术讲座', 1); |