-- KYN POS Phase 2 Minimum Seed Data
-- Purpose: Safe baseline lookup rows for a fresh development database.
-- Run after: 001_foundation_schema.sql and 002_core_pos_schema.sql
-- Notes: This file does not create real staff passwords or PINs.

INSERT IGNORE INTO pos_staff_roles (role_key, role_name, role_description, is_manager_role, is_active) VALUES
('owner_admin', 'Owner / Admin', 'Full access to POS setup, reports, staff, closeout, and integrations.', 1, 1),
('manager', 'Manager', 'Can approve voids, discounts, cash drawer, closeout, and operational overrides.', 1, 1),
('server', 'Server', 'Can open checks, add items, send courses, and take payments within permissions.', 0, 1),
('cashier', 'Cashier', 'Can take payments and close checks within permissions.', 0, 1),
('kitchen', 'Kitchen', 'Can view kitchen tickets and mark items ready/cooked.', 0, 1),
('auditor', 'Read-only Auditor', 'Can view reports without changing operational data.', 0, 1);

INSERT IGNORE INTO pos_service_types (service_type_key, service_type_name, affects_packaging, is_active, display_order) VALUES
('dine_in', 'Dine In', 0, 1, 10),
('takeout', 'Takeout', 1, 1, 20),
('delivery', 'Delivery', 1, 1, 30),
('bar', 'Bar', 0, 1, 40),
('catering', 'Catering', 1, 1, 50);

INSERT IGNORE INTO pos_payment_methods (method_key, method_name, method_type, requires_processor_reference, is_active, display_order) VALUES
('cash', 'Cash', 'cash', 0, 1, 10),
('credit_card', 'Credit Card', 'credit_card', 1, 1, 20),
('debit_card', 'Debit Card', 'debit_card', 1, 1, 30),
('gift_card', 'Gift Card', 'gift_card', 1, 1, 40),
('check', 'Check', 'check', 0, 1, 50),
('other', 'Other', 'other', 0, 1, 90);

INSERT IGNORE INTO pos_discount_reason_codes (reason_key, reason_name, requires_manager_approval, is_active) VALUES
('manager_discount', 'Manager Discount', 1, 1),
('guest_recovery', 'Guest Recovery', 1, 1),
('employee_meal', 'Employee Meal', 1, 1),
('promotion', 'Promotion', 0, 1),
('coupon', 'Coupon', 0, 1);

INSERT IGNORE INTO pos_void_reason_codes (reason_key, reason_name, food_cost_impact, requires_manager_approval, is_active) VALUES
('mistake_before_send', 'Mistake Before Send', 'none', 0, 1),
('mistake_after_send', 'Mistake After Send', 'waste', 1, 1),
('guest_changed_mind', 'Guest Changed Mind', 'unknown', 1, 1),
('kitchen_error', 'Kitchen Error', 'waste', 1, 1),
('server_error', 'Server Error', 'waste', 1, 1),
('quality_issue', 'Quality Issue', 'waste', 1, 1),
('theft_review', 'Theft / Review Needed', 'theft_review', 1, 1);
