-- Seed data for the Invoice Reminders schema, from section 14 of the blueprint. Load after invoice-reminders.sql. -- The spec dates the seed relative to today and its examples use Thursday, October 15, 2026, so dates here are fixed to that day. -- The ids are readable slugs; the spec gives none. -- Settings. from_name is Northwind Design, as the spec's example subject "Northwind Design: $7,300.00 overdue" shows. -- The spec gives no reply-to address, so reply_to is empty. INSERT INTO settings (id, company_name, company_domain, from_name, from_email, reply_to, time_zone, send_time, sending_enabled, account_owner_cc_on_final) VALUES ('settings', 'Northwind Design', 'northwind.example', 'Northwind Design', 'accounts@northwind.example', NULL, 'America/New_York', '09:00', FALSE, TRUE); -- Three people. Emails are firstname@northwind.example. INSERT INTO people (id, name, email, role, active) VALUES ('p_maya', 'Maya Ortiz', 'maya@northwind.example', 'admin', TRUE), ('p_nina', 'Nina Shah', 'nina@northwind.example', 'member', TRUE), ('p_theo', 'Theo Park', 'theo@northwind.example', 'member', TRUE); -- Six customers. Nina owns Bluebird Ltd and Acme Corp; Theo owns the others. Harbor Clinic is paused. INSERT INTO customers (id, name, contact_email, cc_emails, account_owner_id, paused, paused_reason, notes) VALUES ('c_olsen', 'Olsen & Co', 'accounts@olsen.example', '', 'p_theo', FALSE, NULL, NULL), ('c_bluebird', 'Bluebird Ltd', 'payables@bluebird.example', '', 'p_nina', FALSE, NULL, NULL), ('c_acme', 'Acme Corp', 'ap@acme.example', '', 'p_nina', FALSE, NULL, NULL), ('c_kestrel', 'Kestrel Schools', 'finance@kestrel.example', '', 'p_theo', FALSE, NULL, NULL), ('c_harbor', 'Harbor Clinic', 'office@harborclinic.example', '', 'p_theo', TRUE, 'disputing the September hours', NULL), ('c_pinelabs', 'Pine Labs', 'accounts@pinelabs.example', '', 'p_theo', FALSE, NULL, NULL); -- Seven open invoices. Each amount equals its balance, and each issue date is 30 days before its due date. -- INV-1035 carries Kestrel's promise to pay by Oct 20. INSERT INTO invoices (id, number, customer_id, issue_date, due_date, amount_cents, balance_cents, status, pay_link, dispute_reason, promise_date, not_in_latest_import, last_imported_at) VALUES ('i_1025', 'INV-1025', 'c_olsen', '2026-08-01', '2026-08-31', 90000, 90000, 'open', NULL, NULL, NULL, FALSE, NULL), ('i_1029', 'INV-1029', 'c_bluebird', '2026-08-16', '2026-09-15', 1200000, 1200000, 'open', NULL, NULL, NULL, FALSE, NULL), ('i_1032', 'INV-1032', 'c_acme', '2026-09-08', '2026-10-08', 250000, 250000, 'open', NULL, NULL, NULL, FALSE, NULL), ('i_1035', 'INV-1035', 'c_kestrel', '2026-09-01', '2026-10-01', 320000, 320000, 'open', NULL, NULL, '2026-10-20', FALSE, NULL), ('i_1037', 'INV-1037', 'c_harbor', '2026-09-05', '2026-10-05', 190000, 190000, 'open', NULL, NULL, NULL, FALSE, NULL), ('i_1041', 'INV-1041', 'c_acme', '2026-09-18', '2026-10-18', 480000, 480000, 'open', NULL, NULL, NULL, FALSE, NULL), ('i_1043', 'INV-1043', 'c_pinelabs', '2026-10-15', '2026-11-14', 650000, 650000, 'open', NULL, NULL, NULL, FALSE, NULL);