-- INVEETAIRE SEED DATA
-- Generated from Physical Database Design (PDD v1.0)

SET FOREIGN_KEY_CHECKS = 0;

TRUNCATE TABLE `roles`;
INSERT INTO `roles` (id, name, slug, description, is_system) VALUES
(1, 'Super Admin', 'super_admin', 'Full platform access. Platform operator role.', 1),
(2, 'Couple',      'couple',      'Full access to own wedding workspace.',          1),
(3, 'Event Crew',  'crew',        'Wedding day check-in operations only.',          1);

TRUNCATE TABLE `event_types`;
INSERT INTO `event_types` (id, name, slug, description, is_active) VALUES
(1, 'Wedding',    'wedding',    'Full wedding management platform with all modules.', 1),
(2, 'Engagement', 'engagement', 'Simplified engagement event with core modules.',     1);

TRUNCATE TABLE `commercial_plans`;
INSERT INTO `commercial_plans` (id, name, slug, default_retention_days, default_archive_days, max_crew_accounts, max_guests, max_gallery_images, is_active) VALUES
(1, 'Starter',      'starter',      180, 365, 3,  150,  15, 1),
(2, 'Pro',          'professional', 365, 730, 10, 500,  30, 1),
(3, 'Custom',       'custom',       365, 730, 20, 9999, 50, 1);

TRUNCATE TABLE `themes`;
INSERT INTO `themes` (id, name, slug, description, theme_status) VALUES
(1, 'Klasik Putih', 'klasik-putih', 'Elegant white classic wedding theme.', 'released');

TRUNCATE TABLE `theme_versions`;
INSERT INTO `theme_versions` (id, theme_id, version_number, is_breaking_change, changelog, is_active) VALUES
(1, 1, '1.0', 0, 'Initial release.', 1);

TRUNCATE TABLE `theme_event_types`;
INSERT INTO `theme_event_types` (theme_version_id, event_type_id) VALUES
(1, 1),
(1, 2);

TRUNCATE TABLE `system_configurations`;
INSERT INTO `system_configurations` (config_key, config_value, value_type, description) VALUES
('max_guests_per_workspace',    '1000',  'number',  'Platform default max guests'),
('max_gallery_images',          '20',    'number',  'Max gallery images per invitation'),
('max_file_size_image_mb',      '10',    'number',  'Max upload size for images in MB'),
('max_file_size_audio_mb',      '15',    'number',  'Max upload size for audio in MB'),
('session_timeout_hours',       '24',    'number',  'Couple session absolute timeout'),
('crew_session_timeout_hours',  '12',    'number',  'Crew session timeout'),
('admin_session_timeout_hours', '8',     'number',  'Admin session absolute timeout'),
('default_rsvp_allow_edit',     '1',     'boolean', 'Whether RSVP editing is enabled by default'),
('guest_code_length',           '16',    'number',  'Guest code character length'),
('export_temp_retention_hours', '24',    'number',  'Hours before temp export files are deleted'),
('allowed_image_types',         '["jpg","jpeg","png","webp"]', 'json', 'Allowed image MIME types'),
('allowed_audio_types',         '["mp3","aac","ogg"]', 'json', 'Allowed audio MIME types');

SET FOREIGN_KEY_CHECKS = 1;
