-- Seed data for the Equipment Tracker schema, from section 14 of the blueprint. Load after equipment-tracker.sql. -- The seed day in the spec is Tue 13 Oct 2026 (T). It gives dates without times, so every timestamp here is 12:00 UTC -- on the date given, which is the same date in America/New_York. INSERT INTO people (id, name, email, is_it_admin, active) VALUES ('p-ben', 'Ben Cho', 'ben@fernway.example', TRUE, TRUE), ('p-dana', 'Dana Ruiz', 'dana@fernway.example', TRUE, TRUE), ('p-lee', 'Lee Park', 'lee@fernway.example', FALSE, TRUE), ('p-jo', 'Jo Park', 'jo@fernway.example', FALSE, TRUE), ('p-sam', 'Sam Okafor', 'sam@fernway.example', FALSE, TRUE), ('p-maya', 'Maya Chen', 'maya@fernway.example', FALSE, TRUE), ('p-priya', 'Priya Nair', 'priya@fernway.example', FALSE, TRUE); INSERT INTO settings (id, company_name, it_email, time_zone, email_domain, warranty_notice_days, tag_prefix, next_tag_number) VALUES (1, 'Fernway', 'it@fernway.example', 'America/New_York', 'fernway.example', 30, 'NW-', 9); INSERT INTO item_types (id, name, active) VALUES ('type-laptop', 'Laptop', TRUE), ('type-monitor', 'Monitor', TRUE), ('type-phone', 'Phone', TRUE), ('type-accessory', 'Accessory', TRUE), ('type-other', 'Other', TRUE); -- Make is the first word of "Make and model" in the spec; created_at is the purchase date. INSERT INTO items (id, tag, type_id, make, model, serial_number, purchase_date, cost_cents, supplier, warranty_end, status, holder_id, location, notes, retire_reason, created_at, version) VALUES ('item-0001', 'NW-0001', 'type-laptop', 'Apple', 'MacBook Pro 14', 'C02XK1', '2023-11-02', 239900, NULL, '2026-11-02', 'assigned', 'p-lee', NULL, NULL, NULL, '2023-11-02 12:00:00', 1), ('item-0002', 'NW-0002', 'type-laptop', 'Apple', 'MacBook Air 13', 'C02YP7', '2024-03-15', 129900, NULL, '2027-03-15', 'assigned', 'p-jo', NULL, NULL, NULL, '2024-03-15 12:00:00', 1), ('item-0003', 'NW-0003', 'type-monitor', 'Dell', '27 monitor', 'CN0D27A', '2024-03-15', 37900, NULL, '2027-03-15', 'assigned', 'p-jo', NULL, NULL, NULL, '2024-03-15 12:00:00', 1), ('item-0004', 'NW-0004', 'type-laptop', 'Apple', 'MacBook Pro 14', 'C02ZQ3', '2026-10-01', 239900, NULL, '2029-10-01', 'in_stock', NULL, NULL, NULL, NULL, '2026-10-01 12:00:00', 1), ('item-0005', 'NW-0005', 'type-phone', 'Apple', 'iPhone 15', 'F17XR2', '2024-09-30', 89900, NULL, '2026-09-30', 'assigned', 'p-sam', NULL, NULL, NULL, '2024-09-30 12:00:00', 1), ('item-0006', 'NW-0006', 'type-laptop', 'Apple', 'MacBook Air 13', 'C02WM8', '2024-01-10', 129900, NULL, '2027-01-10', 'in_repair', NULL, NULL, NULL, NULL, '2024-01-10 12:00:00', 1), ('item-0007', 'NW-0007', 'type-laptop', 'Lenovo', 'ThinkPad X1', 'PF3K9', '2021-02-01', 145000, NULL, '2024-02-01', 'retired', NULL, NULL, NULL, 'Battery failure', '2021-02-01 12:00:00', 1), ('item-0008', 'NW-0008', 'type-monitor', 'Dell', '27 monitor', 'CN0D27B', '2024-03-15', 37900, NULL, '2027-03-15', 'in_stock', NULL, NULL, NULL, NULL, '2024-03-15 12:00:00', 1); -- Ben Cho made every seed check-out and the NW-0006 check-in, 5 days before the seed day, with the repair note. INSERT INTO assignments (id, item_id, person_id, checked_out_at, checked_out_by, condition_out, checked_in_at, checked_in_by, condition_in) VALUES ('asg-1', 'item-0001', 'p-lee', '2023-11-06 12:00:00', 'p-ben', NULL, NULL, NULL, NULL), ('asg-2', 'item-0002', 'p-jo', '2024-03-18 12:00:00', 'p-ben', NULL, NULL, NULL, NULL), ('asg-3', 'item-0003', 'p-jo', '2024-03-18 12:00:00', 'p-ben', NULL, NULL, NULL, NULL), ('asg-4', 'item-0005', 'p-sam', '2024-10-02 12:00:00', 'p-ben', NULL, NULL, NULL, NULL), ('asg-5', 'item-0006', 'p-maya', '2024-01-12 12:00:00', 'p-ben', NULL, '2026-10-08 12:00:00', 'p-ben', 'Keyboard not responding'); -- Seed events are marked as seed data. The spec names no actor for created and retired, so those are the system (NULL). INSERT INTO events (id, item_id, actor_id, type, data, created_at) VALUES ('ev-01', 'item-0001', NULL, 'created', '{"seed": true}', '2023-11-02 12:00:00'), ('ev-02', 'item-0002', NULL, 'created', '{"seed": true}', '2024-03-15 12:00:00'), ('ev-03', 'item-0003', NULL, 'created', '{"seed": true}', '2024-03-15 12:00:00'), ('ev-04', 'item-0004', NULL, 'created', '{"seed": true}', '2026-10-01 12:00:00'), ('ev-05', 'item-0005', NULL, 'created', '{"seed": true}', '2024-09-30 12:00:00'), ('ev-06', 'item-0006', NULL, 'created', '{"seed": true}', '2024-01-10 12:00:00'), ('ev-07', 'item-0007', NULL, 'created', '{"seed": true}', '2021-02-01 12:00:00'), ('ev-08', 'item-0008', NULL, 'created', '{"seed": true}', '2024-03-15 12:00:00'), ('ev-09', 'item-0001', 'p-ben', 'checked_out', '{"seed": true}', '2023-11-06 12:00:00'), ('ev-10', 'item-0002', 'p-ben', 'checked_out', '{"seed": true}', '2024-03-18 12:00:00'), ('ev-11', 'item-0003', 'p-ben', 'checked_out', '{"seed": true}', '2024-03-18 12:00:00'), ('ev-12', 'item-0005', 'p-ben', 'checked_out', '{"seed": true}', '2024-10-02 12:00:00'), ('ev-13', 'item-0006', 'p-ben', 'checked_out', '{"seed": true}', '2024-01-12 12:00:00'), ('ev-14', 'item-0006', 'p-ben', 'checked_in', '{"seed": true}', '2026-10-08 12:00:00'), ('ev-15', 'item-0006', 'p-ben', 'sent_to_repair', '{"seed": true}', '2026-10-08 12:00:00'), ('ev-16', 'item-0007', NULL, 'retired', '{"seed": true}', '2024-02-01 12:00:00');