Files
tutortool/backend/demo/demo_seed.sql

62 lines
4.0 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": 90, "y": 150, "width": 200, "height": 70, "type": "table" },
{ "id": "T2", "label": "T2", "x": 470, "y": 150, "width": 200, "height": 70, "type": "table" },
{ "id": "T3", "label": "T3", "x": 90, "y": 320, "width": 200, "height": 70, "type": "table" },
{ "id": "T4", "label": "T4", "x": 470, "y": 320, "width": 200, "height": 70, "type": "table" },
{ "id": "T1-1", "label": "1", "x": 146.0, "y": 128, "width": 36, "height": 36, "type": "seat" },
{ "id": "T1-2", "label": "2", "x": 234.0, "y": 128, "width": 36, "height": 36, "type": "seat" },
{ "id": "T1-3", "label": "3", "x": 146.0, "y": 242, "width": 36, "height": 36, "type": "seat" },
{ "id": "T1-4", "label": "4", "x": 234.0, "y": 242, "width": 36, "height": 36, "type": "seat" },
{ "id": "T1-5", "label": "5", "x": 316, "y": 185.0, "width": 36, "height": 36, "type": "seat" },
{ "id": "T2-1", "label": "1", "x": 526.0, "y": 128, "width": 36, "height": 36, "type": "seat" },
{ "id": "T2-2", "label": "2", "x": 614.0, "y": 128, "width": 36, "height": 36, "type": "seat" },
{ "id": "T2-3", "label": "3", "x": 526.0, "y": 242, "width": 36, "height": 36, "type": "seat" },
{ "id": "T2-4", "label": "4", "x": 614.0, "y": 242, "width": 36, "height": 36, "type": "seat" },
{ "id": "T2-5", "label": "5", "x": 696, "y": 185.0, "width": 36, "height": 36, "type": "seat" },
{ "id": "T3-1", "label": "1", "x": 146.0, "y": 298, "width": 36, "height": 36, "type": "seat" },
{ "id": "T3-2", "label": "2", "x": 234.0, "y": 298, "width": 36, "height": 36, "type": "seat" },
{ "id": "T3-3", "label": "3", "x": 146.0, "y": 412, "width": 36, "height": 36, "type": "seat" },
{ "id": "T3-4", "label": "4", "x": 234.0, "y": 412, "width": 36, "height": 36, "type": "seat" },
{ "id": "T3-5", "label": "5", "x": 316, "y": 355.0, "width": 36, "height": 36, "type": "seat" },
{ "id": "T4-1", "label": "1", "x": 526.0, "y": 298, "width": 36, "height": 36, "type": "seat" },
{ "id": "T4-2", "label": "2", "x": 614.0, "y": 298, "width": 36, "height": 36, "type": "seat" },
{ "id": "T4-3", "label": "3", "x": 526.0, "y": 412, "width": 36, "height": 36, "type": "seat" },
{ "id": "T4-4", "label": "4", "x": 614.0, "y": 412, "width": 36, "height": 36, "type": "seat" },
{ "id": "T4-5", "label": "5", "x": 696, "y": 355.0, "width": 36, "height": 36, "type": "seat" }
]');
-- 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');