Files
tutortool/backend/demo/demo_seed.sql

45 lines
2.3 KiB
SQL

-- Demo Seed Data
-- Tutor/Admin Account (Password: admin)
INSERT OR IGNORE INTO tutors (id, name, email, password_hash, is_superadmin)
VALUES (1, 'Demo Admin', 'admin@tutortool.com', '$2b$12$ted9u9ZsxbjhnWvTYsijMul138qhIKQG1RVsY8wGA3RFKZl8EaAsm', 1);
-- Courses
INSERT OR IGNORE INTO courses (id, name, semester)
VALUES (1, 'Demo Course 101', 'Summer 2026');
-- Link Tutor to Course
INSERT OR IGNORE INTO tutor_courses (tutor_id, course_id)
VALUES (1, 1);
-- Rooms
INSERT OR IGNORE INTO rooms (id, name, layout_json)
VALUES (1, 'Room A (Small)', '[
{"id": "t1", "label": "T1", "x": 100, "y": 100, "width": 120, "height": 60, "type": "table"},
{"id": "s1", "label": "1", "x": 110, "y": 110, "width": 40, "height": 40, "type": "seat"},
{"id": "s2", "label": "2", "x": 170, "y": 110, "width": 40, "height": 40, "type": "seat"},
{"id": "t2", "label": "T2", "x": 300, "y": 100, "width": 120, "height": 60, "type": "table"},
{"id": "s3", "label": "3", "x": 310, "y": 110, "width": 40, "height": 40, "type": "seat"},
{"id": "s4", "label": "4", "x": 370, "y": 110, "width": 40, "height": 40, "type": "seat"},
{"id": "d1", "label": "Door", "x": 10, "y": 10, "width": 60, "height": 10, "type": "door"}
]');
-- Students
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (1, 1, 'Alice Smith');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (2, 1, 'Bob Jones');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (3, 1, 'Charlie Brown');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (4, 1, 'David Wilson');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (5, 1, 'Eve Taylor');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (6, 1, 'Frank Miller');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (7, 1, 'Grace Lee');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (8, 1, 'Heidi Davis');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (9, 1, 'Ivan Garcia');
INSERT OR IGNORE INTO students (id, course_id, name) VALUES (10, 1, 'Judy Martinez');
-- Session (Today)
INSERT OR IGNORE INTO sessions (id, course_id, week_nr, date)
VALUES (1, 1, 1, date('now'));
-- Slot (Active Demo Slot)
INSERT OR IGNORE INTO slots (id, session_id, room_id, tutor_id, start_time, end_time, status, code)
VALUES (1, 1, 1, 1, '08:00', '18:00', 'open', 'demo123');