-- Pronto Backend MySQL seed data
-- Use this only if you do not run: php artisan db:seed
-- Recommended setup: php artisan migrate --seed

INSERT INTO users
(uuid, name, email, phone_country_code, phone, role, status, password, created_at, updated_at)
VALUES
(UUID(), 'Super Admin', 'admin@pronto.local', '+91', '9999999999', 'super_admin', 'active', '$2y$10$3irtnfpnWn.5IUVMwk.aauIQFesvqN/hES3iXAvys8g.qpTGI53B6', NOW(), NOW()),
(UUID(), 'Demo Customer', 'customer@pronto.local', '+91', '8888888888', 'customer', 'active', '$2y$10$Gl/Ax1raZGg4ClfN2ALCKe6MZDTUYDlfGBOhyk7IqxxSaQz4CsIZC', NOW(), NOW())
ON DUPLICATE KEY UPDATE updated_at = NOW();

INSERT INTO cities (name, slug, state, country, timezone, status, created_at, updated_at) VALUES
('Gurugram', 'gurugram', 'Haryana', 'India', 'Asia/Kolkata', 'active', NOW(), NOW()),
('Delhi', 'delhi', 'Delhi', 'India', 'Asia/Kolkata', 'active', NOW(), NOW()),
('Noida', 'noida', 'Uttar Pradesh', 'India', 'Asia/Kolkata', 'active', NOW(), NOW()),
('Bengaluru', 'bengaluru', 'Karnataka', 'India', 'Asia/Kolkata', 'active', NOW(), NOW()),
('Mumbai', 'mumbai', 'Maharashtra', 'India', 'Asia/Kolkata', 'active', NOW(), NOW())
ON DUPLICATE KEY UPDATE updated_at = NOW();

INSERT INTO service_categories (name, slug, sort_order, status, created_at, updated_at) VALUES
('Hourly Help', 'hourly-help', 1, 'active', NOW(), NOW()),
('Cleaning', 'cleaning', 2, 'active', NOW(), NOW()),
('Kitchen', 'kitchen', 3, 'active', NOW(), NOW()),
('Laundry', 'laundry', 4, 'active', NOW(), NOW()),
('Express', 'express', 5, 'active', NOW(), NOW())
ON DUPLICATE KEY UPDATE updated_at = NOW();

INSERT INTO skills (name, slug, status, created_at, updated_at) VALUES
('Cleaning', 'cleaning', 'active', NOW(), NOW()),
('Kitchen Prep', 'kitchen-prep', 'active', NOW(), NOW()),
('Laundry', 'laundry', 'active', NOW(), NOW()),
('Plant Care', 'plant-care', 'active', NOW(), NOW()),
('Car Surface Cleaning', 'car-cleaning', 'active', NOW(), NOW())
ON DUPLICATE KEY UPDATE updated_at = NOW();

INSERT INTO price_books (name, starts_at, status, created_at, updated_at)
VALUES ('Default India Price Book', NOW(), 'active', NOW(), NOW())
ON DUPLICATE KEY UPDATE updated_at = NOW();

INSERT INTO fee_rules (name, fee_type, calculation_type, value, status, created_at, updated_at) VALUES
('Convenience Fee', 'convenience', 'fixed', 25.00, 'active', NOW(), NOW()),
('Pro Welfare Fee', 'pro_welfare', 'percent', 2.00, 'active', NOW(), NOW());

INSERT INTO tax_rules (name, tax_type, percent, hsn_sac, status, created_at, updated_at)
VALUES ('GST 18%', 'gst', 18.00, '998533', 'active', NOW(), NOW());

INSERT INTO coupons
(code, description, discount_type, discount_value, max_discount, min_order_amount, starts_at, ends_at, usage_limit, per_user_limit, status, created_at, updated_at)
VALUES
('WELCOME50', 'Flat Rs 50 off on first booking', 'fixed', 50.00, 50.00, 199.00, NOW(), DATE_ADD(NOW(), INTERVAL 1 YEAR), 10000, 1, 'active', NOW(), NOW())
ON DUPLICATE KEY UPDATE updated_at = NOW();

INSERT INTO cms_pages (slug, title, body_html, version, status, published_at, created_at, updated_at) VALUES
('terms', 'Terms and Conditions', '<p>Platform terms for customer and professional services.</p>', '1.0', 'published', NOW(), NOW(), NOW()),
('privacy', 'Privacy Policy', '<p>Privacy policy covering account, booking, payment, and support data.</p>', '1.0', 'published', NOW(), NOW(), NOW()),
('cancellation-policy', 'Cancellation Policy', '<p>Instant, scheduled, and recurring bookings follow the configured refund policy.</p>', '1.0', 'published', NOW(), NOW(), NOW()),
('delete-account', 'Delete Account', '<p>Customers can request account deletion from the app.</p>', '1.0', 'published', NOW(), NOW(), NOW())
ON DUPLICATE KEY UPDATE updated_at = NOW();
