-- Seed data for the Document Requests schema, from section 14 of the blueprint. Load after document-requests.sql. -- Today is Thursday 2026-10-15 (UTC days). The spec gives dates only, so times are 12:00 UTC. -- Request tokens, storage keys, file sizes and upload times are stand-ins: the spec gives none of them. INSERT INTO settings (id, firm_name, from_email, retention_days, reminder_first_after_days, reminder_every_days, reminder_before_due_days, max_reminders) VALUES (1, 'Ledger & Co', 'documents@ledgerco.example', 90, 3, 4, 2, 6); INSERT INTO staff (id, name, email, role, active) VALUES ('staff_maya', 'Maya Ortiz', 'maya@ledgerco.example', 'admin', TRUE), ('staff_sam', 'Sam Lee', 'sam@ledgerco.example', 'staff', TRUE), ('staff_ivy', 'Ivy Chen', 'ivy@ledgerco.example', 'staff', TRUE); INSERT INTO templates (id, name) VALUES ('tpl_year_end', 'Year-end 2026'), ('tpl_q2_receipts', 'Q2 receipts'); INSERT INTO template_items (template_id, position, label, help_text, kind, options, required) VALUES ('tpl_year_end', 1, 'Bank statements, January to December', NULL, 'files', NULL, TRUE), ('tpl_year_end', 2, 'Credit card statements', NULL, 'files', NULL, TRUE), ('tpl_year_end', 3, 'Payroll summary', NULL, 'files', NULL, TRUE), ('tpl_year_end', 4, 'Vehicle mileage', NULL, 'text', NULL, TRUE), ('tpl_year_end', 5, 'Any new loans or leases?', NULL, 'choice', 'Yes No', TRUE), ('tpl_year_end', 6, 'Loan or lease documents', NULL, 'files', NULL, FALSE), ('tpl_year_end', 7, 'Point-of-sale sales report', NULL, 'files', NULL, TRUE), ('tpl_year_end', 8, 'Owner''s draws', NULL, 'text', NULL, TRUE), ('tpl_q2_receipts', 1, 'Receipts, April to June', NULL, 'files', NULL, TRUE), ('tpl_q2_receipts', 2, 'Anything we should know?', NULL, 'long_text', NULL, FALSE); INSERT INTO clients (id, name, contact_name, contact_email) VALUES ('client_bluebird', 'Bluebird Bakery', 'Ana Lopez', 'ana@bluebirdbakery.example'), ('client_pine', 'Pine Dental', 'Dr. Lee Park', 'office@pinedental.example'), ('client_harbor', 'Harbor Studio', 'Jo Harbor', 'jo@harborstudio.example'); -- R-0009 reminders_sent is 0 because the spec does not say how many reminders it had. INSERT INTO requests (id, number, client_id, title, owner_id, due_on, status, sent_at, submitted_at, completed_at, cancelled_at, token, token_revoked, reminders_sent, last_reminded_on) VALUES ('req_0009', 'R-0009', 'client_harbor', 'Q2 receipts', 'staff_sam', '2026-07-15', 'completed', '2026-07-01 12:00:00', '2026-07-20 12:00:00', '2026-07-24 12:00:00', NULL, 'token-placeholder-r0009', FALSE, 0, NULL), ('req_0011', 'R-0011', 'client_harbor', 'Year-end 2026', 'staff_sam', '2026-10-30', 'submitted', '2026-10-01 12:00:00', '2026-10-13 12:00:00', NULL, NULL, 'token-placeholder-r0011', FALSE, 3, '2026-10-12'), ('req_0012', 'R-0012', 'client_bluebird', 'Year-end 2026', 'staff_sam', '2026-10-30', 'in_progress', '2026-10-05 12:00:00', NULL, NULL, NULL, 'token-placeholder-r0012', FALSE, 2, '2026-10-12'), ('req_0013', 'R-0013', 'client_pine', 'Year-end 2026', 'staff_ivy', '2026-10-30', 'sent', '2026-10-12 12:00:00', NULL, NULL, NULL, 'token-placeholder-r0013', FALSE, 0, NULL); INSERT INTO request_items (id, request_id, position, label, help_text, kind, options, required, answer_text, review, review_comment, updated_at) VALUES ('item_0009_1', 'req_0009', 1, 'Receipts, April to June', NULL, 'files', NULL, TRUE, NULL, 'accepted', NULL, NULL), ('item_0009_2', 'req_0009', 2, 'Anything we should know?', NULL, 'long_text', NULL, FALSE, 'Two of the June receipts are for the new oven.', 'answered', NULL, NULL), ('item_0011_1', 'req_0011', 1, 'Bank statements, January to December', NULL, 'files', NULL, TRUE, NULL, 'answered', NULL, NULL), ('item_0011_2', 'req_0011', 2, 'Credit card statements', NULL, 'files', NULL, TRUE, NULL, 'answered', NULL, NULL), ('item_0011_3', 'req_0011', 3, 'Payroll summary', NULL, 'files', NULL, TRUE, NULL, 'answered', NULL, NULL), ('item_0011_4', 'req_0011', 4, 'Vehicle mileage', NULL, 'text', NULL, TRUE, '3,150 business miles', 'answered', NULL, NULL), ('item_0011_5', 'req_0011', 5, 'Any new loans or leases?', NULL, 'choice', 'Yes No', TRUE, 'No', 'answered', NULL, NULL), ('item_0011_6', 'req_0011', 6, 'Loan or lease documents', NULL, 'files', NULL, FALSE, NULL, 'empty', NULL, NULL), ('item_0011_7', 'req_0011', 7, 'Point-of-sale sales report', NULL, 'files', NULL, TRUE, NULL, 'answered', NULL, NULL), ('item_0011_8', 'req_0011', 8, 'Owner''s draws', NULL, 'text', NULL, TRUE, '$24,000', 'answered', NULL, NULL), ('item_0012_1', 'req_0012', 1, 'Bank statements, January to December', NULL, 'files', NULL, TRUE, NULL, 'answered', NULL, NULL), ('item_0012_2', 'req_0012', 2, 'Credit card statements', NULL, 'files', NULL, TRUE, NULL, 'accepted', NULL, NULL), ('item_0012_3', 'req_0012', 3, 'Payroll summary', NULL, 'files', NULL, TRUE, NULL, 'accepted', NULL, NULL), ('item_0012_4', 'req_0012', 4, 'Vehicle mileage', NULL, 'text', NULL, TRUE, '12,400 business miles', 'accepted', NULL, NULL), ('item_0012_5', 'req_0012', 5, 'Any new loans or leases?', NULL, 'choice', 'Yes No', TRUE, 'No', 'answered', NULL, NULL), ('item_0012_6', 'req_0012', 6, 'Loan or lease documents', NULL, 'files', NULL, FALSE, NULL, 'empty', NULL, NULL), ('item_0012_7', 'req_0012', 7, 'Point-of-sale sales report', NULL, 'files', NULL, TRUE, NULL, 'empty', NULL, NULL), ('item_0012_8', 'req_0012', 8, 'Owner''s draws', NULL, 'text', NULL, TRUE, NULL, 'empty', NULL, NULL), ('item_0013_1', 'req_0013', 1, 'Bank statements, January to December', NULL, 'files', NULL, TRUE, NULL, 'empty', NULL, NULL), ('item_0013_2', 'req_0013', 2, 'Credit card statements', NULL, 'files', NULL, TRUE, NULL, 'empty', NULL, NULL), ('item_0013_3', 'req_0013', 3, 'Payroll summary', NULL, 'files', NULL, TRUE, NULL, 'empty', NULL, NULL), ('item_0013_4', 'req_0013', 4, 'Vehicle mileage', NULL, 'text', NULL, TRUE, NULL, 'empty', NULL, NULL), ('item_0013_5', 'req_0013', 5, 'Any new loans or leases?', NULL, 'choice', 'Yes No', TRUE, NULL, 'empty', NULL, NULL), ('item_0013_6', 'req_0013', 6, 'Loan or lease documents', NULL, 'files', NULL, FALSE, NULL, 'empty', NULL, NULL), ('item_0013_7', 'req_0013', 7, 'Point-of-sale sales report', NULL, 'files', NULL, TRUE, NULL, 'empty', NULL, NULL), ('item_0013_8', 'req_0013', 8, 'Owner''s draws', NULL, 'text', NULL, TRUE, NULL, 'empty', NULL, NULL); -- Each seeded file is a small PDF (section 14). size 1024 and the upload day are stand-ins. INSERT INTO files (id, item_id, name, size, type, storage_key, uploaded_at, deleted_at) VALUES ('file_0009_1_1', 'item_0009_1', 'harbor-receipts-q2-2026-1.pdf', 1024, 'application/pdf', 'placeholder/file_0009_1_1', '2026-07-20 12:00:00', NULL), ('file_0009_1_2', 'item_0009_1', 'harbor-receipts-q2-2026-2.pdf', 1024, 'application/pdf', 'placeholder/file_0009_1_2', '2026-07-20 12:00:00', NULL), ('file_0009_1_3', 'item_0009_1', 'harbor-receipts-q2-2026-3.pdf', 1024, 'application/pdf', 'placeholder/file_0009_1_3', '2026-07-20 12:00:00', NULL), ('file_0009_1_4', 'item_0009_1', 'harbor-receipts-q2-2026-4.pdf', 1024, 'application/pdf', 'placeholder/file_0009_1_4', '2026-07-20 12:00:00', NULL), ('file_0011_1_1', 'item_0011_1', 'harbor-bank-statements-2026.pdf', 1024, 'application/pdf', 'placeholder/file_0011_1_1', '2026-10-13 12:00:00', NULL), ('file_0011_2_1', 'item_0011_2', 'harbor-credit-card-2026.pdf', 1024, 'application/pdf', 'placeholder/file_0011_2_1', '2026-10-13 12:00:00', NULL), ('file_0011_3_1', 'item_0011_3', 'harbor-payroll-summary-2026.pdf', 1024, 'application/pdf', 'placeholder/file_0011_3_1', '2026-10-13 12:00:00', NULL), ('file_0011_7_1', 'item_0011_7', 'harbor-point-of-sale-2026.pdf', 1024, 'application/pdf', 'placeholder/file_0011_7_1', '2026-10-13 12:00:00', NULL), ('file_0012_1_1', 'item_0012_1', 'bluebird-bank-statements-2026.pdf', 1024, 'application/pdf', 'placeholder/file_0012_1_1', '2026-10-14 12:00:00', NULL), ('file_0012_2_1', 'item_0012_2', 'bluebird-credit-card-2026.pdf', 1024, 'application/pdf', 'placeholder/file_0012_2_1', '2026-10-14 12:00:00', NULL), ('file_0012_3_1', 'item_0012_3', 'bluebird-payroll-summary-2026.pdf', 1024, 'application/pdf', 'placeholder/file_0012_3_1', '2026-10-14 12:00:00', NULL);