-- Seed data for the Help Desk schema, from section 14 of the blueprint. Load after help-desk.sql. -- The spec times the seed relative to T, the moment it is loaded. This file fixes T at 2026-12-04 12:00:00 UTC; shift every timestamp by the same amount to use another T. INSERT INTO settings (id, company_name, support_email, time_zone, target_urgent_minutes, target_high_minutes, target_normal_minutes, target_low_minutes, auto_close_days, acknowledgement_template, last_ticket_number) VALUES (1, 'Northwind', 'support@northwind.example', 'America/New_York', 60, 240, 480, 1440, 4, 'Hi {requester_first_name}, we''ve received your request #{ticket_number} ({subject}). We''ll reply as soon as we can. Northwind support', 1008); INSERT INTO agents (id, name, email, is_admin, active) VALUES ('agent_dana', 'Dana Ruiz', 'dana@northwind.example', TRUE, TRUE), ('agent_jo', 'Jo Park', 'jo@northwind.example', FALSE, TRUE), ('agent_ben', 'Ben Cho', 'ben@northwind.example', FALSE, TRUE); -- created_at is the creation time of each requester's first seeded ticket. INSERT INTO requesters (id, email, name, created_at) VALUES ('req_max', 'max@bluebird.example', 'Max Ford', '2026-11-19 12:00:00'), ('req_ella', 'ella@ridgeway.example', 'Ella Brooks', '2026-12-04 03:00:00'), ('req_kim', 'kim@olsen.example', 'Kim Olsen', '2026-12-03 10:00:00'), ('req_priya', 'priya@acme.example', 'Priya Shah', '2026-12-02 10:00:00'), ('req_tom', 'tom@acme.example', 'Tom Becker', '2026-12-03 06:00:00'), ('req_rosa', 'rosa@harbor.example', 'Rosa Diaz', '2026-12-01 12:00:00'), ('req_lee', 'lee@pinelabs.example', 'Lee Grant', '2026-11-28 12:00:00'); -- first_response_due_at = created_at + the default target for the priority (R5). -- updated_at is the latest time the spec gives for each ticket. INSERT INTO tickets (id, number, subject, requester_id, channel, status, priority, assignee_id, follow_up_of, created_at, first_response_at, first_response_due_at, solved_at, closed_at, updated_at, version) VALUES ('ticket_1001', 1001, 'Password reset email never arrives', 'req_max', 'email', 'new', 'high', NULL, NULL, '2026-12-04 09:00:00', NULL, '2026-12-04 13:00:00', NULL, NULL, '2026-12-04 09:00:00', 1), ('ticket_1002', 1002, 'Invoice shows the wrong company name', 'req_ella', 'email', 'new', 'normal', NULL, NULL, '2026-12-04 03:00:00', NULL, '2026-12-04 11:00:00', NULL, NULL, '2026-12-04 03:00:00', 1), ('ticket_1003', 1003, 'How do I add a teammate?', 'req_kim', 'email', 'open', 'normal', 'agent_jo', NULL, '2026-12-03 10:00:00', '2026-12-03 12:00:00', '2026-12-03 18:00:00', NULL, NULL, '2026-12-04 11:00:00', 1), ('ticket_1004', 1004, 'Export to CSV fails over 5,000 rows', 'req_priya', 'email', 'on_hold', 'high', 'agent_ben', NULL, '2026-12-02 10:00:00', '2026-12-02 11:00:00', '2026-12-02 14:00:00', NULL, NULL, '2026-12-02 11:00:00', 1), ('ticket_1005', 1005, 'Can we change our billing date?', 'req_tom', 'email', 'pending', 'normal', 'agent_jo', NULL, '2026-12-03 06:00:00', '2026-12-03 08:00:00', '2026-12-03 14:00:00', NULL, NULL, '2026-12-03 08:00:00', 1), ('ticket_1006', 1006, 'Bulk import question', 'req_rosa', 'email', 'solved', 'normal', 'agent_ben', NULL, '2026-12-01 12:00:00', '2026-12-01 13:00:00', '2026-12-01 20:00:00', '2026-12-02 12:00:00', NULL, '2026-12-02 12:00:00', 1), ('ticket_1007', 1007, 'Where do I download invoices?', 'req_lee', 'email', 'solved', 'low', 'agent_jo', NULL, '2026-11-28 12:00:00', '2026-11-28 15:00:00', '2026-11-29 12:00:00', '2026-11-29 12:00:00', NULL, '2026-11-29 12:00:00', 1), ('ticket_1008', 1008, 'Login loop on Safari', 'req_max', 'email', 'closed', 'normal', 'agent_ben', NULL, '2026-11-19 12:00:00', '2026-11-19 14:00:00', '2026-11-19 20:00:00', '2026-11-20 12:00:00', '2026-11-24 12:00:00', '2026-11-24 12:00:00', 1);