-- Seed data for the Testimonial Wall schema, from section 14 of the blueprint. Load after testimonial-wall.sql. -- Northwind. The spec times everything from T, the moment the seed is loaded. This file fixes T at 2026-10-15 12:00:00 UTC, -- so "T - 40d" is 2026-09-05 12:00:00. To reload relative to now, shift every timestamp by the same amount. -- Tokens must be random (section 5); the values below are placeholders to replace. INSERT INTO people (id, name, email, active, created_at, role) VALUES ('maya', 'Maya Chen', 'maya@northwind.example', TRUE, '2026-10-15 12:00:00', 'admin'), ('jo', 'Jo Park', 'jo@northwind.example', TRUE, '2026-10-15 12:00:00', 'moderator'), ('sam', 'Sam Okafor', 'sam@northwind.example', TRUE, '2026-10-15 12:00:00', 'member'), ('alex', 'Alex Kim', 'alex@northwind.example', FALSE, '2026-10-15 12:00:00', 'member'); INSERT INTO settings (id, company_name, wall_title, form_intro, permission_text, permission_version, form_open, time_zone) VALUES (1, 'Northwind', 'What our customers say', 'Tell us what changed for your team since you started using Northwind. We read every response.', 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, TRUE, 'America/New_York'); -- Ben's invitation was completed by his submission at T - 30d (testimonial t-ben). Nora's is open and expires 14 days after it was created. INSERT INTO invitations (id, token, created_by_id, name, email, company, job_title, prefill_quote, source, source_note, status, created_at, expires_at, reminded_at, completed_at, testimonial_id) VALUES ('inv-ben', 'placeholder-invite-token-ben-00000', 'sam', 'Ben Adler', 'ben@bluebird.example', 'Bluebird', 'Operations Lead', 'We set it up in one afternoon.', 'call', 'Renewal call, said this unprompted', 'completed', '2026-09-13 12:00:00', '2026-09-27 12:00:00', NULL, '2026-09-15 12:00:00', 't-ben'), ('inv-nora', 'placeholder-invite-token-nora-0000', 'sam', 'Nora Quinn', 'nora@lumenstudio.example', 'Lumen Studio', 'Head of Finance', 'Approvals don''t get lost in Slack anymore.', 'email', 'Reply to our renewal email', 'open', '2026-10-14 12:00:00', '2026-10-28 12:00:00', NULL, NULL, NULL); -- Consent "yes" means the version 1 wording, version 1, given at the sent time. Lee Hart gave none. -- Kai Jensen keeps the version 1 evidence from T - 60d, with consent FALSE and withdrawn_at T - 3d. INSERT INTO testimonials (id, submitted_at, updated_at, name, email, company, job_title, quote, rating, consent, consent_text, consent_version, consent_at, withdrawn_at, status, featured, source, invitation_id, manage_token, review_note, reviewed_by_id, reviewed_at, published_at) VALUES ('t-ana', '2026-09-05 12:00:00', '2026-09-06 12:00:00', 'Ana Moreno', 'ana@harborstudio.example', 'Harbor Studio', 'Finance Manager', 'Northwind saved us a week every month. Month-end used to mean chasing approvals by email. Now every approval is in one place, with a name and a time next to it.', 5, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-09-05 12:00:00', NULL, 'published', TRUE, 'form', NULL, 'placeholder-manage-token-ana0000', NULL, 'jo', '2026-09-06 12:00:00', '2026-09-06 12:00:00'), ('t-ben', '2026-09-15 12:00:00', '2026-09-16 12:00:00', 'Ben Adler', 'ben@bluebird.example', 'Bluebird', 'Operations Lead', 'We set it up in one afternoon. The next morning the whole team was using it, and nobody asked for a training session.', 5, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-09-15 12:00:00', NULL, 'published', FALSE, 'invitation', 'inv-ben', 'placeholder-manage-token-ben0000', NULL, 'jo', '2026-09-16 12:00:00', '2026-09-16 12:00:00'), ('t-rosa', '2026-09-24 12:00:00', '2026-09-25 12:00:00', 'Rosa Lind', 'rosa@olsen.example', 'Olsen & Co', 'Founder', 'Our approvals finally have a paper trail. When our accountant asked who signed off on a purchase, we found it in ten seconds.', NULL, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-09-24 12:00:00', NULL, 'published', FALSE, 'form', NULL, 'placeholder-manage-token-rosa000', NULL, 'jo', '2026-09-25 12:00:00', '2026-09-25 12:00:00'), ('t-hugo', '2026-10-01 12:00:00', '2026-10-02 12:00:00', 'Hugo Brandt', 'hugo@kestrelschools.example', 'Kestrel Schools', 'Finance Director', 'Rolling it out to forty staff took a week, mostly because we were careful. It has been reliable ever since.', 4, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-10-01 12:00:00', NULL, 'published', FALSE, 'form', NULL, 'placeholder-manage-token-hugo000', NULL, 'jo', '2026-10-02 12:00:00', '2026-10-02 12:00:00'), ('t-theo', '2026-10-06 12:00:00', '2026-10-07 12:00:00', 'Theo Grant', 'theo@pinestreetdental.example', 'Pine Street Dental', 'Office Manager', 'It does the job. The reports could be more flexible, but approvals no longer get lost, which is what we needed.', 3, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-10-06 12:00:00', NULL, 'published', FALSE, 'form', NULL, 'placeholder-manage-token-theo000', NULL, 'jo', '2026-10-07 12:00:00', '2026-10-07 12:00:00'), ('t-omar', '2026-10-10 12:00:00', '2026-10-11 12:00:00', 'Omar Haddad', 'omar@fieldstonelabs.example', 'Fieldstone Labs', 'IT Manager', 'Single sign-on worked the first time, and our IT team has not had a single ticket about it since.', 4, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-10-10 12:00:00', NULL, 'approved', FALSE, 'form', NULL, 'placeholder-manage-token-omar000', 'Good for the IT page.', 'jo', '2026-10-11 12:00:00', NULL), ('t-cy', '2026-10-13 12:00:00', '2026-10-13 12:00:00', 'Cy Patel', 'cy@acme.example', 'Acme', 'Office Manager', 'The team actually uses it, which is a first for us. Filtering requests on a phone is fiddly, but on a laptop it is quick and clear.', 4, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-10-13 12:00:00', NULL, 'pending', FALSE, 'form', NULL, 'placeholder-manage-token-cy00000', NULL, NULL, NULL, NULL), ('t-lee', '2026-10-14 12:00:00', '2026-10-14 12:00:00', 'Lee Hart', 'lee@ridgeway.example', 'Ridgeway', 'Director', 'Please keep this private. Our first two weeks were rough because the import kept failing, but your support team fixed it within a day.', NULL, FALSE, NULL, NULL, NULL, NULL, 'pending', FALSE, 'form', NULL, 'placeholder-manage-token-lee0000', NULL, NULL, NULL, NULL), ('t-felix', '2026-10-03 12:00:00', '2026-10-04 12:00:00', 'Felix Wong', 'felix@bramblebakery.example', 'Bramble Bakery', 'Owner', 'We approve every order for our biggest client, Harbor Foods, about $40,000 a month, and nothing slips through.', 5, TRUE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-10-03 12:00:00', NULL, 'rejected', FALSE, 'form', NULL, 'placeholder-manage-token-felix00', 'Names a client and their spend. We can''t publish that.', 'jo', '2026-10-04 12:00:00', NULL), ('t-kai', '2026-08-16 12:00:00', '2026-10-12 12:00:00', 'Kai Jensen', 'kai@larkspurlabs.example', 'Larkspur Labs', 'COO', 'Approvals that took days now take minutes. I would recommend Northwind to any operations team.', 5, FALSE, 'I give Northwind permission to publish this quote, rating, name, role and company on its website. I can withdraw permission at any time.', 1, '2026-08-16 12:00:00', '2026-10-12 12:00:00', 'withdrawn', FALSE, 'form', NULL, 'placeholder-manage-token-kai0000', NULL, 'jo', '2026-08-17 12:00:00', '2026-08-17 12:00:00'); -- The history in section 14, plus the creation and completion of the two invitations (R11: every change writes an event). INSERT INTO events (id, testimonial_id, invitation_id, created_at, actor_type, actor_id, type, note, data) VALUES ('ev-01', 't-kai', NULL, '2026-08-16 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-02', 't-kai', NULL, '2026-08-17 12:00:00', 'person', 'jo', 'approved', NULL, NULL), ('ev-03', 't-kai', NULL, '2026-08-17 12:00:00', 'person', 'jo', 'published', NULL, NULL), ('ev-04', 't-ana', NULL, '2026-09-05 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-05', 't-ana', NULL, '2026-09-06 12:00:00', 'person', 'jo', 'approved', NULL, NULL), ('ev-06', 't-ana', NULL, '2026-09-06 12:00:00', 'person', 'jo', 'published', NULL, NULL), ('ev-07', 't-ana', NULL, '2026-09-06 12:00:00', 'person', 'maya', 'featured', NULL, NULL), ('ev-08', NULL, 'inv-ben', '2026-09-13 12:00:00', 'person', 'sam', 'invitation_created', NULL, NULL), ('ev-09', 't-ben', 'inv-ben', '2026-09-15 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-10', NULL, 'inv-ben', '2026-09-15 12:00:00', 'customer', NULL, 'invitation_completed', NULL, NULL), ('ev-11', 't-ben', NULL, '2026-09-16 12:00:00', 'person', 'jo', 'approved', NULL, NULL), ('ev-12', 't-ben', NULL, '2026-09-16 12:00:00', 'person', 'jo', 'published', NULL, NULL), ('ev-13', 't-rosa', NULL, '2026-09-24 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-14', 't-rosa', NULL, '2026-09-25 12:00:00', 'person', 'jo', 'approved', NULL, NULL), ('ev-15', 't-rosa', NULL, '2026-09-25 12:00:00', 'person', 'jo', 'published', NULL, NULL), ('ev-16', 't-hugo', NULL, '2026-10-01 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-17', 't-hugo', NULL, '2026-10-02 12:00:00', 'person', 'jo', 'approved', NULL, NULL), ('ev-18', 't-hugo', NULL, '2026-10-02 12:00:00', 'person', 'jo', 'published', NULL, NULL), ('ev-19', 't-felix', NULL, '2026-10-03 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-20', 't-felix', NULL, '2026-10-04 12:00:00', 'person', 'jo', 'rejected', 'Names a client and their spend. We can''t publish that.', NULL), ('ev-21', 't-theo', NULL, '2026-10-06 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-22', 't-theo', NULL, '2026-10-07 12:00:00', 'person', 'jo', 'approved', NULL, NULL), ('ev-23', 't-theo', NULL, '2026-10-07 12:00:00', 'person', 'jo', 'published', NULL, NULL), ('ev-24', 't-omar', NULL, '2026-10-10 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-25', 't-omar', NULL, '2026-10-11 12:00:00', 'person', 'jo', 'approved', 'Good for the IT page.', NULL), ('ev-26', 't-kai', NULL, '2026-10-12 12:00:00', 'customer', NULL, 'withdrawn', NULL, NULL), ('ev-27', 't-cy', NULL, '2026-10-13 12:00:00', 'customer', NULL, 'submitted', NULL, NULL), ('ev-28', NULL, 'inv-nora', '2026-10-14 12:00:00', 'person', 'sam', 'invitation_created', NULL, NULL), ('ev-29', 't-lee', NULL, '2026-10-14 12:00:00', 'customer', NULL, 'submitted', NULL, NULL);