-- Seed data for the Visitor Sign-In schema, from section 14 of the blueprint. Load after visitor-sign-in.sql. -- Today is Thursday 2026-10-15 in America/Chicago (UTC-5 in October and July), so 08:30 local is 13:30 UTC. -- The device token, invite codes, badge codes and document texts are readable placeholders; the spec gives none of them. INSERT INTO settings (id, office_name, address, time_zone, retention_days, auto_sign_out_time, privacy_notice, reception_email, badge_size, slack_webhook_url) VALUES (1, 'Harbor & Pine Architects', '400 W Lake St, Chicago', 'America/Chicago', 90, '19:00', NULL, 'reception@harborpine.example', '62 x 100 mm', NULL); INSERT INTO people (id, name, email, role, active) VALUES ('person_kim', 'Kim Olsen', 'kim@harborpine.example', 'admin', TRUE), ('person_raj', 'Raj Patel', 'raj@harborpine.example', 'staff', TRUE), ('person_lena', 'Lena Fox', 'lena@harborpine.example', 'staff', TRUE), ('person_tom', 'Tom Reed', 'tom@harborpine.example', 'staff', TRUE); INSERT INTO devices (id, name, token, active) VALUES ('device_reception_ipad', 'Reception iPad', 'device-token-placeholder', TRUE); INSERT INTO documents (id, title, active_version, re_sign_after_days) VALUES ('doc_nda', 'Mutual NDA', 2, 365), ('doc_safety', 'Site safety rules', 1, 30); -- Published 400 and 200 days before 2026-10-15. The spec says only that version 2 adds a two-year term. INSERT INTO document_versions (document_id, version, body, published_at) VALUES ('doc_nda', 1, 'Placeholder for the text of Mutual NDA version 1.', '2025-09-10 12:00:00'), ('doc_nda', 2, 'Placeholder for the text of Mutual NDA version 2, which adds a two-year term.', '2026-03-29 12:00:00'), ('doc_safety', 1, 'Placeholder for the text of Site safety rules version 1.', '2026-03-29 12:00:00'); INSERT INTO visit_types (id, name, requires_host, document_id, prints_badge, asks_company, active) VALUES ('type_guest', 'Guest', TRUE, 'doc_nda', TRUE, TRUE, TRUE), ('type_interview', 'Interview', TRUE, NULL, TRUE, FALSE, TRUE), ('type_contractor', 'Contractor', TRUE, 'doc_safety', TRUE, TRUE, TRUE), ('type_delivery', 'Delivery', FALSE, NULL, FALSE, TRUE, TRUE); INSERT INTO invites (id, visitor_name, visitor_email, company, host_id, visit_type_id, expected_at, code, status) VALUES ('invite_mark', 'Mark Bell', 'mark@clientco.example', 'Clientco', 'person_lena', 'type_guest', '2026-10-15 19:00:00', 'invite-code-placeholder-mark', 'expected'), ('invite_dev', 'Dev Gupta', 'dev@vendorly.example', 'Vendorly', 'person_tom', 'type_guest', '2026-10-15 21:00:00', 'invite-code-placeholder-dev', 'expected'), ('invite_sara', 'Sara Kim', 'sara@example.com', NULL, 'person_raj', 'type_interview', '2026-10-16 15:00:00', 'invite-code-placeholder-sara', 'expected'); -- Sam Ortiz (91 days ago) and Priya Shah (89 days ago): the spec gives no sign-out method, so it is NULL. INSERT INTO visits (id, visitor_name, visitor_email, company, visit_type_id, host_id, invite_id, signed_in_at, signed_out_at, sign_out_method, badge_code, anonymized_at) VALUES ('visit_sam', 'Sam Ortiz', 'sam@ortizdesign.example', 'Ortiz Design', 'type_guest', 'person_tom', NULL, '2026-07-16 15:00:00', '2026-07-16 16:00:00', NULL, 'badge-placeholder-sam', NULL), ('visit_priya', 'Priya Shah', 'priya@shahlegal.example', 'Shah Legal', 'type_guest', 'person_lena', NULL, '2026-07-18 15:00:00', '2026-07-18 16:00:00', NULL, 'badge-placeholder-priya', NULL), ('visit_leo', 'Leo Grant', 'leo@northfield.example', 'Northfield Homes', 'type_guest', 'person_raj', NULL, '2026-10-14 14:30:00', '2026-10-14 15:40:00', 'kiosk', 'badge-placeholder-leo', NULL), ('visit_nina', 'Nina Brooks', NULL, NULL, 'type_interview', 'person_tom', NULL, '2026-10-14 18:00:00', '2026-10-14 19:10:00', 'host', 'badge-placeholder-nina', NULL), ('visit_carl', 'Carl Weber', NULL, 'Brightwire Electrical', 'type_contractor', 'person_kim', NULL, '2026-10-14 20:00:00', '2026-10-15 00:00:00', 'auto', 'badge-placeholder-carl', NULL), ('visit_omar', 'Omar Haddad', NULL, 'Brightwire Electrical', 'type_contractor', 'person_kim', NULL, '2026-10-15 13:30:00', NULL, NULL, 'badge-placeholder-omar', NULL), ('visit_ana', 'Ana Ruiz', 'ana@bluebird.example', 'Bluebird', 'type_guest', 'person_raj', NULL, '2026-10-15 14:12:00', NULL, NULL, 'badge-placeholder-ana', NULL), ('visit_jo', 'Jo Park', NULL, NULL, 'type_interview', 'person_lena', NULL, '2026-10-15 15:00:00', '2026-10-15 16:05:00', 'kiosk', 'badge-placeholder-jo', NULL); -- typed_name is the visitor name, as section 6 requires. Only Ana has a signing time in the spec; the others use the sign-in time. INSERT INTO signatures (id, visit_id, visitor_email, document_id, version, typed_name, signed_at) VALUES ('sig_sam', 'visit_sam', 'sam@ortizdesign.example', 'doc_nda', 2, 'Sam Ortiz', '2026-07-16 15:00:00'), ('sig_priya', 'visit_priya', 'priya@shahlegal.example', 'doc_nda', 2, 'Priya Shah', '2026-07-18 15:00:00'), ('sig_leo', 'visit_leo', 'leo@northfield.example', 'doc_nda', 2, 'Leo Grant', '2026-10-14 14:30:00'), ('sig_carl', 'visit_carl', NULL, 'doc_safety', 1, 'Carl Weber', '2026-10-14 20:00:00'), ('sig_omar', 'visit_omar', NULL, 'doc_safety', 1, 'Omar Haddad', '2026-10-15 13:30:00'), ('sig_ana', 'visit_ana', 'ana@bluebird.example', 'doc_nda', 2, 'Ana Ruiz', '2026-10-15 14:13:00');