USE incident_db;

-- Sample incidents (matches the dashboard screenshot style)
INSERT INTO incidents (id, incident_datetime, type, location, severity, status, title, description, reporter_name, reporter_email, created_at, updated_at)
VALUES
  ('INC-1735234567890', '2024-01-22 07:30:00', 'Equipment Failure', 'Finishing Department - Cutting Station 5', 'Critical', 'Investigating',
   'Cutting station jam caused emergency stop', 'Machine jam triggered emergency stop. Area secured and maintenance notified.', 'line-supervisor', 'line-supervisor@example.com', NOW(), NOW()),
  ('INC-1735123456789', '2024-01-20 11:10:00', 'Near Miss', 'Pulp Processing Area - Chemical Storage Room', 'Critical', 'Open',
   'Chemical container found leaking', 'Minor leak identified during routine inspection. Spill kit used and area isolated.', 'safety-inspector', 'safety-inspector@example.com', NOW(), NOW()),
  ('INC-1734890123456', '2024-01-18 14:20:00', 'Accident', 'Warehouse - Loading Dock 2', 'High', 'Investigating',
   'Forklift near-collision', 'Operator reported a near-collision with pallet stack. No injuries. Investigation in progress.', 'warehouse-supervisor', 'warehouse-supervisor@example.com', NOW(), NOW()),
  ('INC-1734567890123', '2024-01-15 09:45:00', 'Unsafe Condition', 'Paper Mill - Production Floor B, Near Rolling Machine #3', 'Medium', 'Resolved',
   'Oil spill near rolling machine', 'Oil spill cleaned and warning signage placed. Root cause addressed and housekeeping reminder issued.', 'operator-mike', 'operator-mike@example.com', NOW(), NOW());

-- Sample comments
INSERT INTO incident_comments (incident_id, comment, actor_name, actor_email, is_system, created_at)
VALUES
  ('INC-1735234567890', 'Incident created', 'line-supervisor', 'line-supervisor@example.com', 1, NOW()),
  ('INC-1735123456789', 'Incident created', 'safety-inspector', 'safety-inspector@example.com', 1, NOW()),
  ('INC-1734890123456', 'Incident created', 'warehouse-supervisor', 'warehouse-supervisor@example.com', 1, NOW()),
  ('INC-1734567890123', 'Incident created', 'operator-mike', 'operator-mike@example.com', 1, NOW());
