-- ============================================================================
-- Default permission catalogue
-- Format: module.action
-- Special sensitive-data actions: view_cost_price, view_profit (spec section 4)
-- ============================================================================

INSERT INTO permissions (module, action, slug, description) VALUES
-- Rooms
('rooms', 'view', 'rooms.view', 'View rooms'),
('rooms', 'create', 'rooms.create', 'Create rooms'),
('rooms', 'edit', 'rooms.edit', 'Edit rooms'),
('rooms', 'delete', 'rooms.delete', 'Delete rooms'),
-- Reservations / Front desk
('reservations', 'view', 'reservations.view', 'View reservations'),
('reservations', 'create', 'reservations.create', 'Create reservations'),
('reservations', 'edit', 'reservations.edit', 'Edit reservations'),
('reservations', 'cancel', 'reservations.cancel', 'Cancel reservations'),
('reservations', 'checkin', 'reservations.checkin', 'Check guests in'),
('reservations', 'checkout', 'reservations.checkout', 'Check guests out'),
-- Housekeeping
('housekeeping', 'view', 'housekeeping.view', 'View housekeeping tasks'),
('housekeeping', 'manage', 'housekeeping.manage', 'Manage housekeeping tasks'),
-- Maintenance
('maintenance', 'view', 'maintenance.view', 'View maintenance tickets'),
('maintenance', 'manage', 'maintenance.manage', 'Manage maintenance tickets'),
-- Restaurant
('restaurant', 'view', 'restaurant.view', 'View restaurant module'),
('restaurant', 'operate_pos', 'restaurant.operate_pos', 'Operate restaurant POS'),
('restaurant', 'view_cost_price', 'restaurant.view_cost_price', 'View restaurant cost price / profit'),
('restaurant', 'refund', 'restaurant.refund', 'Issue restaurant refunds'),
('restaurant', 'void', 'restaurant.void', 'Void restaurant orders'),
-- Bar
('bar', 'view', 'bar.view', 'View bar module'),
('bar', 'operate_pos', 'bar.operate_pos', 'Operate bar POS'),
('bar', 'view_cost_price', 'bar.view_cost_price', 'View bar cost price / profit'),
('bar', 'refund', 'bar.refund', 'Issue bar refunds'),
('bar', 'void', 'bar.void', 'Void bar orders'),
-- Inventory
('inventory', 'view', 'inventory.view', 'View inventory'),
('inventory', 'manage', 'inventory.manage', 'Manage stock movements'),
('inventory', 'view_cost_price', 'inventory.view_cost_price', 'View inventory cost price'),
-- Purchasing
('purchasing', 'view', 'purchasing.view', 'View purchasing'),
('purchasing', 'create', 'purchasing.create', 'Create purchase orders'),
('purchasing', 'approve', 'purchasing.approve', 'Approve purchase orders'),
-- Accounting
('accounting', 'view_financial', 'accounting.view_financial', 'View financial reports and revenue'),
('accounting', 'manage', 'accounting.manage', 'Manage accounting entries'),
-- HR
('hr', 'view', 'hr.view', 'View HR records'),
('hr', 'manage', 'hr.manage', 'Manage HR records'),
('hr', 'view_salary', 'hr.view_salary', 'View salary / bank information'),
-- Reports
('reports', 'view', 'reports.view', 'View reports'),
('reports', 'export', 'reports.export', 'Export reports'),
-- Settings / system
('settings', 'manage', 'settings.manage', 'Manage hotel settings'),
('users', 'manage', 'users.manage', 'Manage users and roles'),
('audit', 'view', 'audit.view', 'View audit logs'),
('chat', 'view', 'chat.view', 'View internal chats'),
-- Pool / Cinema / Salon / Laundry / Events / Conference
('pool', 'manage', 'pool.manage', 'Manage swimming pool bookings'),
('cinema', 'manage', 'cinema.manage', 'Manage cinema bookings'),
('salon', 'manage', 'salon.manage', 'Manage salon appointments'),
('laundry', 'manage', 'laundry.manage', 'Manage laundry orders'),
('events', 'manage', 'events.manage', 'Manage events'),
('conference', 'manage', 'conference.manage', 'Manage conference bookings'),
-- Backups
('backup', 'manage', 'backup.manage', 'Manage database backups (Super Admin only in practice)'),
-- Website / CMS
('cms', 'manage', 'cms.manage', 'Manage public website content (pages, banners, galleries, testimonials)'),
-- Integrations (smart locks, hardware)
('integrations', 'manage', 'integrations.manage', 'Configure smart-lock and hardware integrations');
