<?php
/**
 * RUHONDO BEACH RESORT HMS + POS System
 * System Constants and Lookup Values
 * Developer: JOACHIM'S INNOTECH
 */

// =============================================
// USER ROLES AND DEPARTMENTS
// =============================================
if (!defined('ROLE_SUPER_ADMIN')) define('ROLE_SUPER_ADMIN', 1);
if (!defined('ROLE_ADMIN')) define('ROLE_ADMIN', 2);
if (!defined('ROLE_FRONT_DESK_MANAGER')) define('ROLE_FRONT_DESK_MANAGER', 3);
if (!defined('ROLE_FRONT_DESK_AGENT')) define('ROLE_FRONT_DESK_AGENT', 4);
if (!defined('ROLE_POS_MANAGER')) define('ROLE_POS_MANAGER', 5);
if (!defined('ROLE_CASHIER')) define('ROLE_CASHIER', 6);
if (!defined('ROLE_HOUSEKEEPING_MANAGER')) define('ROLE_HOUSEKEEPING_MANAGER', 7);
if (!defined('ROLE_HOUSEKEEPER')) define('ROLE_HOUSEKEEPER', 8);
if (!defined('ROLE_MAINTENANCE_STAFF')) define('ROLE_MAINTENANCE_STAFF', 9);
if (!defined('ROLE_INVENTORY_MANAGER')) define('ROLE_INVENTORY_MANAGER', 10);
if (!defined('ROLE_ACCOUNTANT')) define('ROLE_ACCOUNTANT', 11);
if (!defined('ROLE_GUEST_RELATIONS')) define('ROLE_GUEST_RELATIONS', 12);
if (!defined('ROLE_RESTRICTED_USER')) define('ROLE_RESTRICTED_USER', 13);

// Departments
if (!defined('DEPT_ADMIN')) define('DEPT_ADMIN', 'Administration');
if (!defined('DEPT_IT')) define('DEPT_IT', 'IT');
if (!defined('DEPT_FRONT_OFFICE')) define('DEPT_FRONT_OFFICE', 'Front Office');
if (!defined('DEPT_FNB')) define('DEPT_FNB', 'F&B');
if (!defined('DEPT_HOUSEKEEPING')) define('DEPT_HOUSEKEEPING', 'Housekeeping');
if (!defined('DEPT_MAINTENANCE')) define('DEPT_MAINTENANCE', 'Maintenance');
if (!defined('DEPT_INVENTORY')) define('DEPT_INVENTORY', 'Inventory');
if (!defined('DEPT_FINANCE')) define('DEPT_FINANCE', 'Finance');
if (!defined('DEPT_GUEST_SERVICES')) define('DEPT_GUEST_SERVICES', 'Guest Services');
if (!defined('DEPT_SALES')) define('DEPT_SALES', 'Sales & Marketing');
if (!defined('DEPT_SECURITY')) define('DEPT_SECURITY', 'Security');

// =============================================
// ROOM STATUS CONSTANTS
// =============================================
if (!defined('ROOM_STATUS_AVAILABLE')) define('ROOM_STATUS_AVAILABLE', 'available');
if (!defined('ROOM_STATUS_OCCUPIED')) define('ROOM_STATUS_OCCUPIED', 'occupied');
if (!defined('ROOM_STATUS_MAINTENANCE')) define('ROOM_STATUS_MAINTENANCE', 'maintenance');
if (!defined('ROOM_STATUS_HOUSEKEEPING')) define('ROOM_STATUS_HOUSEKEEPING', 'housekeeping');
if (!defined('ROOM_STATUS_BLOCKED')) define('ROOM_STATUS_BLOCKED', 'blocked');

if (!defined('HK_STATUS_CLEAN')) define('HK_STATUS_CLEAN', 'clean');
if (!defined('HK_STATUS_DIRTY')) define('HK_STATUS_DIRTY', 'dirty');
if (!defined('HK_STATUS_INSPECTED')) define('HK_STATUS_INSPECTED', 'inspected');
if (!defined('HK_STATUS_OUT_OF_SERVICE')) define('HK_STATUS_OUT_OF_SERVICE', 'out_of_service');

// Room status array for dropdowns
if (!defined('ROOM_STATUSES')) define('ROOM_STATUSES', serialize([
    ROOM_STATUS_AVAILABLE => 'Available',
    ROOM_STATUS_OCCUPIED => 'Occupied',
    ROOM_STATUS_MAINTENANCE => 'Maintenance',
    ROOM_STATUS_HOUSEKEEPING => 'Housekeeping',
    ROOM_STATUS_BLOCKED => 'Blocked'
]));

if (!defined('HK_STATUSES')) define('HK_STATUSES', serialize([
    HK_STATUS_CLEAN => 'Clean',
    HK_STATUS_DIRTY => 'Dirty',
    HK_STATUS_INSPECTED => 'Inspected',
    HK_STATUS_OUT_OF_SERVICE => 'Out of Service'
]));

// =============================================
// RESERVATION CONSTANTS
// =============================================
if (!defined('BOOKING_STATUS_PENDING')) define('BOOKING_STATUS_PENDING', 'pending');
if (!defined('BOOKING_STATUS_CONFIRMED')) define('BOOKING_STATUS_CONFIRMED', 'confirmed');
if (!defined('BOOKING_STATUS_CHECKED_IN')) define('BOOKING_STATUS_CHECKED_IN', 'checked_in');
if (!defined('BOOKING_STATUS_CHECKED_OUT')) define('BOOKING_STATUS_CHECKED_OUT', 'checked_out');
if (!defined('BOOKING_STATUS_CANCELLED')) define('BOOKING_STATUS_CANCELLED', 'cancelled');
if (!defined('BOOKING_STATUS_NO_SHOW')) define('BOOKING_STATUS_NO_SHOW', 'no_show');

if (!defined('PAYMENT_STATUS_UNPAID')) define('PAYMENT_STATUS_UNPAID', 'unpaid');
if (!defined('PAYMENT_STATUS_PARTIAL')) define('PAYMENT_STATUS_PARTIAL', 'partial');
if (!defined('PAYMENT_STATUS_PAID')) define('PAYMENT_STATUS_PAID', 'paid');
if (!defined('PAYMENT_STATUS_REFUNDED')) define('PAYMENT_STATUS_REFUNDED', 'refunded');

if (!defined('BOOKING_SOURCE_DIRECT')) define('BOOKING_SOURCE_DIRECT', 'direct');
if (!defined('BOOKING_SOURCE_WEBSITE')) define('BOOKING_SOURCE_WEBSITE', 'website');
if (!defined('BOOKING_SOURCE_PHONE')) define('BOOKING_SOURCE_PHONE', 'phone');
if (!defined('BOOKING_SOURCE_EMAIL')) define('BOOKING_SOURCE_EMAIL', 'email');
if (!defined('BOOKING_SOURCE_WALK_IN')) define('BOOKING_SOURCE_WALK_IN', 'walk_in');
if (!defined('BOOKING_SOURCE_AGENT')) define('BOOKING_SOURCE_AGENT', 'agent');
if (!defined('BOOKING_SOURCE_OTA')) define('BOOKING_SOURCE_OTA', 'ota');

// Booking status arrays
if (!defined('BOOKING_STATUSES')) define('BOOKING_STATUSES', serialize([
    BOOKING_STATUS_PENDING => 'Pending',
    BOOKING_STATUS_CONFIRMED => 'Confirmed',
    BOOKING_STATUS_CHECKED_IN => 'Checked In',
    BOOKING_STATUS_CHECKED_OUT => 'Checked Out',
    BOOKING_STATUS_CANCELLED => 'Cancelled',
    BOOKING_STATUS_NO_SHOW => 'No Show'
]));

if (!defined('PAYMENT_STATUSES')) define('PAYMENT_STATUSES', serialize([
    PAYMENT_STATUS_UNPAID => 'Unpaid',
    PAYMENT_STATUS_PARTIAL => 'Partially Paid',
    PAYMENT_STATUS_PAID => 'Paid',
    PAYMENT_STATUS_REFUNDED => 'Refunded'
]));

if (!defined('BOOKING_SOURCES')) define('BOOKING_SOURCES', serialize([
    BOOKING_SOURCE_DIRECT => 'Direct',
    BOOKING_SOURCE_WEBSITE => 'Website',
    BOOKING_SOURCE_PHONE => 'Phone',
    BOOKING_SOURCE_EMAIL => 'Email',
    BOOKING_SOURCE_WALK_IN => 'Walk-in',
    BOOKING_SOURCE_AGENT => 'Travel Agent',
    BOOKING_SOURCE_OTA => 'Online Travel Agency'
]));

// =============================================
// FOLIO CHARGE TYPES
// =============================================
if (!defined('CHARGE_TYPE_ROOM')) define('CHARGE_TYPE_ROOM', 'room');
if (!defined('CHARGE_TYPE_FNB')) define('CHARGE_TYPE_FNB', 'fnb');
if (!defined('CHARGE_TYPE_SERVICE')) define('CHARGE_TYPE_SERVICE', 'service');
if (!defined('CHARGE_TYPE_TAX')) define('CHARGE_TYPE_TAX', 'tax');
if (!defined('CHARGE_TYPE_DISCOUNT')) define('CHARGE_TYPE_DISCOUNT', 'discount');
if (!defined('CHARGE_TYPE_PAYMENT')) define('CHARGE_TYPE_PAYMENT', 'payment');
if (!defined('CHARGE_TYPE_ADJUSTMENT')) define('CHARGE_TYPE_ADJUSTMENT', 'adjustment');

if (!defined('CHARGE_TYPES')) define('CHARGE_TYPES', serialize([
    CHARGE_TYPE_ROOM => 'Room Charge',
    CHARGE_TYPE_FNB => 'Food & Beverage',
    CHARGE_TYPE_SERVICE => 'Service',
    CHARGE_TYPE_TAX => 'Tax',
    CHARGE_TYPE_DISCOUNT => 'Discount',
    CHARGE_TYPE_PAYMENT => 'Payment',
    CHARGE_TYPE_ADJUSTMENT => 'Adjustment'
]));

// =============================================
// POS CONSTANTS
// =============================================
if (!defined('OUTLET_TYPE_RESTAURANT')) define('OUTLET_TYPE_RESTAURANT', 'restaurant');
if (!defined('OUTLET_TYPE_BAR')) define('OUTLET_TYPE_BAR', 'bar');
if (!defined('OUTLET_TYPE_POOL')) define('OUTLET_TYPE_POOL', 'pool');
if (!defined('OUTLET_TYPE_SPA')) define('OUTLET_TYPE_SPA', 'spa');
if (!defined('OUTLET_TYPE_GIFT_SHOP')) define('OUTLET_TYPE_GIFT_SHOP', 'gift_shop');
if (!defined('OUTLET_TYPE_OTHER')) define('OUTLET_TYPE_OTHER', 'other');

if (!defined('OUTLET_TYPES')) define('OUTLET_TYPES', serialize([
    OUTLET_TYPE_RESTAURANT => 'Restaurant',
    OUTLET_TYPE_BAR => 'Bar',
    OUTLET_TYPE_POOL => 'Pool Bar',
    OUTLET_TYPE_SPA => 'Spa',
    OUTLET_TYPE_GIFT_SHOP => 'Gift Shop',
    OUTLET_TYPE_OTHER => 'Other'
]));

if (!defined('PAYMENT_METHOD_CASH')) define('PAYMENT_METHOD_CASH', 'cash');
if (!defined('PAYMENT_METHOD_CARD')) define('PAYMENT_METHOD_CARD', 'card');
if (!defined('PAYMENT_METHOD_MOBILE_MONEY')) define('PAYMENT_METHOD_MOBILE_MONEY', 'mobile_money');
if (!defined('PAYMENT_METHOD_BANK_TRANSFER')) define('PAYMENT_METHOD_BANK_TRANSFER', 'bank_transfer');
if (!defined('PAYMENT_METHOD_INVOICE')) define('PAYMENT_METHOD_INVOICE', 'invoice');
if (!defined('PAYMENT_METHOD_ROOM_CHARGE')) define('PAYMENT_METHOD_ROOM_CHARGE', 'room_charge');
if (!defined('PAYMENT_METHOD_VOUCHER')) define('PAYMENT_METHOD_VOUCHER', 'voucher');

if (!defined('PAYMENT_METHOD_TYPES')) define('PAYMENT_METHOD_TYPES', serialize([
    PAYMENT_METHOD_CASH => 'Cash',
    PAYMENT_METHOD_CARD => 'Card',
    PAYMENT_METHOD_MOBILE_MONEY => 'Mobile Money',
    PAYMENT_METHOD_BANK_TRANSFER => 'Bank Transfer',
    PAYMENT_METHOD_INVOICE => 'Invoice',
    PAYMENT_METHOD_ROOM_CHARGE => 'Room Charge',
    PAYMENT_METHOD_VOUCHER => 'Voucher'
]));

if (!defined('TRANSACTION_TYPE_SALE')) define('TRANSACTION_TYPE_SALE', 'sale');
if (!defined('TRANSACTION_TYPE_RETURN')) define('TRANSACTION_TYPE_RETURN', 'return');
if (!defined('TRANSACTION_TYPE_VOID')) define('TRANSACTION_TYPE_VOID', 'void');

if (!defined('TRANSACTION_TYPES')) define('TRANSACTION_TYPES', serialize([
    TRANSACTION_TYPE_SALE => 'Sale',
    TRANSACTION_TYPE_RETURN => 'Return',
    TRANSACTION_TYPE_VOID => 'Void'
]));

if (!defined('SHIFT_STATUS_OPEN')) define('SHIFT_STATUS_OPEN', 'open');
if (!defined('SHIFT_STATUS_CLOSED')) define('SHIFT_STATUS_CLOSED', 'closed');
if (!defined('SHIFT_STATUS_RECONCILED')) define('SHIFT_STATUS_RECONCILED', 'reconciled');

if (!defined('SHIFT_STATUSES')) define('SHIFT_STATUSES', serialize([
    SHIFT_STATUS_OPEN => 'Open',
    SHIFT_STATUS_CLOSED => 'Closed',
    SHIFT_STATUS_RECONCILED => 'Reconciled'
]));

// =============================================
// HOUSEKEEPING CONSTANTS
// =============================================
if (!defined('TASK_TYPE_CLEANING')) define('TASK_TYPE_CLEANING', 'cleaning');
if (!defined('TASK_TYPE_MAINTENANCE')) define('TASK_TYPE_MAINTENANCE', 'maintenance');
if (!defined('TASK_TYPE_INSPECTION')) define('TASK_TYPE_INSPECTION', 'inspection');
if (!defined('TASK_TYPE_SUPPLY')) define('TASK_TYPE_SUPPLY', 'supply');

if (!defined('TASK_TYPES')) define('TASK_TYPES', serialize([
    TASK_TYPE_CLEANING => 'Cleaning',
    TASK_TYPE_MAINTENANCE => 'Maintenance',
    TASK_TYPE_INSPECTION => 'Inspection',
    TASK_TYPE_SUPPLY => 'Supply Restock'
]));

if (!defined('PRIORITY_LOW')) define('PRIORITY_LOW', 'low');
if (!defined('PRIORITY_MEDIUM')) define('PRIORITY_MEDIUM', 'medium');
if (!defined('PRIORITY_HIGH')) define('PRIORITY_HIGH', 'high');
if (!defined('PRIORITY_URGENT')) define('PRIORITY_URGENT', 'urgent');

if (!defined('PRIORITIES')) define('PRIORITIES', serialize([
    PRIORITY_LOW => 'Low',
    PRIORITY_MEDIUM => 'Medium',
    PRIORITY_HIGH => 'High',
    PRIORITY_URGENT => 'Urgent'
]));

if (!defined('TASK_STATUS_PENDING')) define('TASK_STATUS_PENDING', 'pending');
if (!defined('TASK_STATUS_ASSIGNED')) define('TASK_STATUS_ASSIGNED', 'assigned');
if (!defined('TASK_STATUS_IN_PROGRESS')) define('TASK_STATUS_IN_PROGRESS', 'in_progress');
if (!defined('TASK_STATUS_COMPLETED')) define('TASK_STATUS_COMPLETED', 'completed');
if (!defined('TASK_STATUS_CANCELLED')) define('TASK_STATUS_CANCELLED', 'cancelled');

if (!defined('TASK_STATUSES')) define('TASK_STATUSES', serialize([
    TASK_STATUS_PENDING => 'Pending',
    TASK_STATUS_ASSIGNED => 'Assigned',
    TASK_STATUS_IN_PROGRESS => 'In Progress',
    TASK_STATUS_COMPLETED => 'Completed',
    TASK_STATUS_CANCELLED => 'Cancelled'
]));

// =============================================
// MAINTENANCE CONSTANTS
// =============================================
if (!defined('TICKET_STATUS_OPEN')) define('TICKET_STATUS_OPEN', 'open');
if (!defined('TICKET_STATUS_ASSIGNED')) define('TICKET_STATUS_ASSIGNED', 'assigned');
if (!defined('TICKET_STATUS_IN_PROGRESS')) define('TICKET_STATUS_IN_PROGRESS', 'in_progress');
if (!defined('TICKET_STATUS_RESOLVED')) define('TICKET_STATUS_RESOLVED', 'resolved');
if (!defined('TICKET_STATUS_CLOSED')) define('TICKET_STATUS_CLOSED', 'closed');

if (!defined('TICKET_STATUSES')) define('TICKET_STATUSES', serialize([
    TICKET_STATUS_OPEN => 'Open',
    TICKET_STATUS_ASSIGNED => 'Assigned',
    TICKET_STATUS_IN_PROGRESS => 'In Progress',
    TICKET_STATUS_RESOLVED => 'Resolved',
    TICKET_STATUS_CLOSED => 'Closed'
]));

// =============================================
// INVENTORY CONSTANTS
// =============================================
if (!defined('PO_STATUS_DRAFT')) define('PO_STATUS_DRAFT', 'draft');
if (!defined('PO_STATUS_ORDERED')) define('PO_STATUS_ORDERED', 'ordered');
if (!defined('PO_STATUS_PARTIAL')) define('PO_STATUS_PARTIAL', 'partial');
if (!defined('PO_STATUS_RECEIVED')) define('PO_STATUS_RECEIVED', 'received');
if (!defined('PO_STATUS_CANCELLED')) define('PO_STATUS_CANCELLED', 'cancelled');

if (!defined('PO_STATUSES')) define('PO_STATUSES', serialize([
    PO_STATUS_DRAFT => 'Draft',
    PO_STATUS_ORDERED => 'Ordered',
    PO_STATUS_PARTIAL => 'Partially Received',
    PO_STATUS_RECEIVED => 'Fully Received',
    PO_STATUS_CANCELLED => 'Cancelled'
]));

if (!defined('MOVEMENT_TYPE_PURCHASE')) define('MOVEMENT_TYPE_PURCHASE', 'purchase');
if (!defined('MOVEMENT_TYPE_SALE')) define('MOVEMENT_TYPE_SALE', 'sale');
if (!defined('MOVEMENT_TYPE_RETURN')) define('MOVEMENT_TYPE_RETURN', 'return');
if (!defined('MOVEMENT_TYPE_ADJUSTMENT')) define('MOVEMENT_TYPE_ADJUSTMENT', 'adjustment');
if (!defined('MOVEMENT_TYPE_TRANSFER_OUT')) define('MOVEMENT_TYPE_TRANSFER_OUT', 'transfer_out');
if (!defined('MOVEMENT_TYPE_TRANSFER_IN')) define('MOVEMENT_TYPE_TRANSFER_IN', 'transfer_in');

if (!defined('MOVEMENT_TYPES')) define('MOVEMENT_TYPES', serialize([
    MOVEMENT_TYPE_PURCHASE => 'Purchase',
    MOVEMENT_TYPE_SALE => 'Sale',
    MOVEMENT_TYPE_RETURN => 'Return',
    MOVEMENT_TYPE_ADJUSTMENT => 'Adjustment',
    MOVEMENT_TYPE_TRANSFER_OUT => 'Transfer Out',
    MOVEMENT_TYPE_TRANSFER_IN => 'Transfer In'
]));

// =============================================
// BILLING CONSTANTS
// =============================================
if (!defined('INVOICE_STATUS_DRAFT')) define('INVOICE_STATUS_DRAFT', 'draft');
if (!defined('INVOICE_STATUS_SENT')) define('INVOICE_STATUS_SENT', 'sent');
if (!defined('INVOICE_STATUS_PARTIAL')) define('INVOICE_STATUS_PARTIAL', 'partial');
if (!defined('INVOICE_STATUS_PAID')) define('INVOICE_STATUS_PAID', 'paid');
if (!defined('INVOICE_STATUS_OVERDUE')) define('INVOICE_STATUS_OVERDUE', 'overdue');
if (!defined('INVOICE_STATUS_CANCELLED')) define('INVOICE_STATUS_CANCELLED', 'cancelled');

if (!defined('INVOICE_STATUSES')) define('INVOICE_STATUSES', serialize([
    INVOICE_STATUS_DRAFT => 'Draft',
    INVOICE_STATUS_SENT => 'Sent',
    INVOICE_STATUS_PARTIAL => 'Partially Paid',
    INVOICE_STATUS_PAID => 'Paid',
    INVOICE_STATUS_OVERDUE => 'Overdue',
    INVOICE_STATUS_CANCELLED => 'Cancelled'
]));

// =============================================
// TAX CONSTANTS
// =============================================
if (!defined('TAX_TYPE_INCLUSIVE')) define('TAX_TYPE_INCLUSIVE', 'inclusive');
if (!defined('TAX_TYPE_EXCLUSIVE')) define('TAX_TYPE_EXCLUSIVE', 'exclusive');

if (!defined('TAX_TYPES')) define('TAX_TYPES', serialize([
    TAX_TYPE_INCLUSIVE => 'Inclusive',
    TAX_TYPE_EXCLUSIVE => 'Exclusive'
]));

// =============================================
// DATE AND TIME CONSTANTS
// =============================================
if (!defined('SECONDS_PER_MINUTE')) define('SECONDS_PER_MINUTE', 60);
if (!defined('SECONDS_PER_HOUR')) define('SECONDS_PER_HOUR', 3600);
if (!defined('SECONDS_PER_DAY')) define('SECONDS_PER_DAY', 86400);
if (!defined('SECONDS_PER_WEEK')) define('SECONDS_PER_WEEK', 604800);
if (!defined('SECONDS_PER_MONTH')) define('SECONDS_PER_MONTH', 2592000);
if (!defined('SECONDS_PER_YEAR')) define('SECONDS_PER_YEAR', 31536000);

if (!defined('DAYS_OF_WEEK')) define('DAYS_OF_WEEK', serialize([
    'monday' => 'Monday',
    'tuesday' => 'Tuesday',
    'wednesday' => 'Wednesday',
    'thursday' => 'Thursday',
    'friday' => 'Friday',
    'saturday' => 'Saturday',
    'sunday' => 'Sunday'
]));

if (!defined('MONTHS')) define('MONTHS', serialize([
    1 => 'January',
    2 => 'February',
    3 => 'March',
    4 => 'April',
    5 => 'May',
    6 => 'June',
    7 => 'July',
    8 => 'August',
    9 => 'September',
    10 => 'October',
    11 => 'November',
    12 => 'December'
]));

// =============================================
// REPORT CONSTANTS
// =============================================
if (!defined('REPORT_PERIOD_TODAY')) define('REPORT_PERIOD_TODAY', 'today');
if (!defined('REPORT_PERIOD_YESTERDAY')) define('REPORT_PERIOD_YESTERDAY', 'yesterday');
if (!defined('REPORT_PERIOD_THIS_WEEK')) define('REPORT_PERIOD_THIS_WEEK', 'this_week');
if (!defined('REPORT_PERIOD_LAST_WEEK')) define('REPORT_PERIOD_LAST_WEEK', 'last_week');
if (!defined('REPORT_PERIOD_THIS_MONTH')) define('REPORT_PERIOD_THIS_MONTH', 'this_month');
if (!defined('REPORT_PERIOD_LAST_MONTH')) define('REPORT_PERIOD_LAST_MONTH', 'last_month');
if (!defined('REPORT_PERIOD_THIS_QUARTER')) define('REPORT_PERIOD_THIS_QUARTER', 'this_quarter');
if (!defined('REPORT_PERIOD_LAST_QUARTER')) define('REPORT_PERIOD_LAST_QUARTER', 'last_quarter');
if (!defined('REPORT_PERIOD_THIS_YEAR')) define('REPORT_PERIOD_THIS_YEAR', 'this_year');
if (!defined('REPORT_PERIOD_LAST_YEAR')) define('REPORT_PERIOD_LAST_YEAR', 'last_year');
if (!defined('REPORT_PERIOD_CUSTOM')) define('REPORT_PERIOD_CUSTOM', 'custom');

if (!defined('REPORT_PERIODS')) define('REPORT_PERIODS', serialize([
    REPORT_PERIOD_TODAY => 'Today',
    REPORT_PERIOD_YESTERDAY => 'Yesterday',
    REPORT_PERIOD_THIS_WEEK => 'This Week',
    REPORT_PERIOD_LAST_WEEK => 'Last Week',
    REPORT_PERIOD_THIS_MONTH => 'This Month',
    REPORT_PERIOD_LAST_MONTH => 'Last Month',
    REPORT_PERIOD_THIS_QUARTER => 'This Quarter',
    REPORT_PERIOD_LAST_QUARTER => 'Last Quarter',
    REPORT_PERIOD_THIS_YEAR => 'This Year',
    REPORT_PERIOD_LAST_YEAR => 'Last Year',
    REPORT_PERIOD_CUSTOM => 'Custom Range'
]));

// =============================================
// FILE UPLOAD CONSTANTS
// =============================================
if (!defined('UPLOAD_TYPE_ID')) define('UPLOAD_TYPE_ID', 'ids');
if (!defined('UPLOAD_TYPE_ROOM')) define('UPLOAD_TYPE_ROOM', 'room_images');
if (!defined('UPLOAD_TYPE_PRODUCT')) define('UPLOAD_TYPE_PRODUCT', 'product_images');
if (!defined('UPLOAD_TYPE_INVOICE')) define('UPLOAD_TYPE_INVOICE', 'invoices');

if (!defined('UPLOAD_TYPES')) define('UPLOAD_TYPES', serialize([
    UPLOAD_TYPE_ID => 'ID Documents',
    UPLOAD_TYPE_ROOM => 'Room Images',
    UPLOAD_TYPE_PRODUCT => 'Product Images',
    UPLOAD_TYPE_INVOICE => 'Invoices'
]));

// =============================================
// NOTIFICATION TYPES
// =============================================
if (!defined('NOTIFICATION_INFO')) define('NOTIFICATION_INFO', 'info');
if (!defined('NOTIFICATION_SUCCESS')) define('NOTIFICATION_SUCCESS', 'success');
if (!defined('NOTIFICATION_WARNING')) define('NOTIFICATION_WARNING', 'warning');
if (!defined('NOTIFICATION_DANGER')) define('NOTIFICATION_DANGER', 'danger');
if (!defined('NOTIFICATION_ALERT')) define('NOTIFICATION_ALERT', 'alert');

if (!defined('NOTIFICATION_TYPES')) define('NOTIFICATION_TYPES', serialize([
    NOTIFICATION_INFO => 'Information',
    NOTIFICATION_SUCCESS => 'Success',
    NOTIFICATION_WARNING => 'Warning',
    NOTIFICATION_DANGER => 'Danger',
    NOTIFICATION_ALERT => 'Alert'
]));

// =============================================
// AUDIT LOG ACTIONS
// =============================================
if (!defined('AUDIT_LOGIN')) define('AUDIT_LOGIN', 'login');
if (!defined('AUDIT_LOGOUT')) define('AUDIT_LOGOUT', 'logout');
if (!defined('AUDIT_LOGIN_FAILED')) define('AUDIT_LOGIN_FAILED', 'login_failed');
if (!defined('AUDIT_CREATE')) define('AUDIT_CREATE', 'create');
if (!defined('AUDIT_UPDATE')) define('AUDIT_UPDATE', 'update');
if (!defined('AUDIT_DELETE')) define('AUDIT_DELETE', 'delete');
if (!defined('AUDIT_VIEW')) define('AUDIT_VIEW', 'view');
if (!defined('AUDIT_EXPORT')) define('AUDIT_EXPORT', 'export');
if (!defined('AUDIT_PRINT')) define('AUDIT_PRINT', 'print');
if (!defined('AUDIT_EMAIL')) define('AUDIT_EMAIL', 'email');
if (!defined('AUDIT_UPLOAD')) define('AUDIT_UPLOAD', 'upload');
if (!defined('AUDIT_DOWNLOAD')) define('AUDIT_DOWNLOAD', 'download');
if (!defined('AUDIT_PAYMENT')) define('AUDIT_PAYMENT', 'payment');
if (!defined('AUDIT_REFUND')) define('AUDIT_REFUND', 'refund');
if (!defined('AUDIT_VOID')) define('AUDIT_VOID', 'void');
if (!defined('AUDIT_CANCEL')) define('AUDIT_CANCEL', 'cancel');
if (!defined('AUDIT_STATUS_CHANGE')) define('AUDIT_STATUS_CHANGE', 'status_change');
if (!defined('AUDIT_ASSIGN')) define('AUDIT_ASSIGN', 'assign');
if (!defined('AUDIT_COMPLETE')) define('AUDIT_COMPLETE', 'complete');
if (!defined('AUDIT_BLACKLIST')) define('AUDIT_BLACKLIST', 'blacklist');
if (!defined('AUDIT_BACKUP')) define('AUDIT_BACKUP', 'backup');
if (!defined('AUDIT_RESTORE')) define('AUDIT_RESTORE', 'restore');
if (!defined('AUDIT_SETTINGS')) define('AUDIT_SETTINGS', 'settings');

// =============================================
// ERROR CODES AND MESSAGES
// =============================================
if (!defined('ERROR_VALIDATION')) define('ERROR_VALIDATION', 'validation_error');
if (!defined('ERROR_UNAUTHORIZED')) define('ERROR_UNAUTHORIZED', 'unauthorized');
if (!defined('ERROR_FORBIDDEN')) define('ERROR_FORBIDDEN', 'forbidden');
if (!defined('ERROR_NOT_FOUND')) define('ERROR_NOT_FOUND', 'not_found');
if (!defined('ERROR_SERVER')) define('ERROR_SERVER', 'server_error');
if (!defined('ERROR_DUPLICATE')) define('ERROR_DUPLICATE', 'duplicate_entry');
if (!defined('ERROR_INVALID_REQUEST')) define('ERROR_INVALID_REQUEST', 'invalid_request');

if (!defined('ERROR_MESSAGES')) define('ERROR_MESSAGES', serialize([
    ERROR_VALIDATION => 'Please check the form for errors.',
    ERROR_UNAUTHORIZED => 'Please log in to continue.',
    ERROR_FORBIDDEN => 'You do not have permission to access this resource.',
    ERROR_NOT_FOUND => 'The requested resource was not found.',
    ERROR_SERVER => 'An internal server error occurred. Please try again later.',
    ERROR_DUPLICATE => 'A record with this information already exists.',
    ERROR_INVALID_REQUEST => 'Invalid request.'
]));

// =============================================
// SUCCESS MESSAGES
// =============================================
if (!defined('SUCCESS_CREATE')) define('SUCCESS_CREATE', 'Record created successfully.');
if (!defined('SUCCESS_UPDATE')) define('SUCCESS_UPDATE', 'Record updated successfully.');
if (!defined('SUCCESS_DELETE')) define('SUCCESS_DELETE', 'Record deleted successfully.');
if (!defined('SUCCESS_SAVE')) define('SUCCESS_SAVE', 'Changes saved successfully.');
if (!defined('SUCCESS_UPLOAD')) define('SUCCESS_UPLOAD', 'File uploaded successfully.');
if (!defined('SUCCESS_EMAIL')) define('SUCCESS_EMAIL', 'Email sent successfully.');
if (!defined('SUCCESS_PAYMENT')) define('SUCCESS_PAYMENT', 'Payment processed successfully.');
if (!defined('SUCCESS_REFUND')) define('SUCCESS_REFUND', 'Refund processed successfully.');
if (!defined('SUCCESS_CHECKIN')) define('SUCCESS_CHECKIN', 'Guest checked in successfully.');
if (!defined('SUCCESS_CHECKOUT')) define('SUCCESS_CHECKOUT', 'Guest checked out successfully.');
if (!defined('SUCCESS_ASSIGN')) define('SUCCESS_ASSIGN', 'Task assigned successfully.');
if (!defined('SUCCESS_COMPLETE')) define('SUCCESS_COMPLETE', 'Task completed successfully.');

// =============================================
// REGEX PATTERNS
// =============================================
if (!defined('REGEX_EMAIL')) define('REGEX_EMAIL', '/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/');
if (!defined('REGEX_PHONE')) define('REGEX_PHONE', '/^\+?[0-9]{10,15}$/');
if (!defined('REGEX_PASSWORD')) define('REGEX_PASSWORD', '/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/');
if (!defined('REGEX_NAME')) define('REGEX_NAME', '/^[a-zA-Z\s\-\']{2,50}$/');
if (!defined('REGEX_USERNAME')) define('REGEX_USERNAME', '/^[a-zA-Z0-9_]{3,50}$/');
if (!defined('REGEX_ALPHA_NUMERIC')) define('REGEX_ALPHA_NUMERIC', '/^[a-zA-Z0-9\s\-_]+$/');
if (!defined('REGEX_NUMERIC')) define('REGEX_NUMERIC', '/^\d+$/');
if (!defined('REGEX_DECIMAL')) define('REGEX_DECIMAL', '/^\d+(\.\d{1,2})?$/');
if (!defined('REGEX_DATE')) define('REGEX_DATE', '/^\d{4}-\d{2}-\d{2}$/');
if (!defined('REGEX_TIME')) define('REGEX_TIME', '/^\d{2}:\d{2}(:\d{2})?$/');
if (!defined('REGEX_URL')) define('REGEX_URL', '/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/');

// =============================================
// SYSTEM DEFAULTS
// =============================================
if (!defined('DEFAULT_LANGUAGE')) define('DEFAULT_LANGUAGE', 'en');
if (!defined('DEFAULT_TIMEZONE')) define('DEFAULT_TIMEZONE', 'Africa/Kigali');
if (!defined('DEFAULT_COUNTRY')) define('DEFAULT_COUNTRY', 'Rwanda');
if (!defined('DEFAULT_CHECKIN_TIME')) define('DEFAULT_CHECKIN_TIME', '14:00:00');
if (!defined('DEFAULT_CHECKOUT_TIME')) define('DEFAULT_CHECKOUT_TIME', '11:00:00');
if (!defined('DEFAULT_MIN_NIGHTS')) define('DEFAULT_MIN_NIGHTS', 1);
if (!defined('DEFAULT_MAX_NIGHTS')) define('DEFAULT_MAX_NIGHTS', 30);
if (!defined('DEFAULT_CANCELLATION_HOURS')) define('DEFAULT_CANCELLATION_HOURS', 24);
if (!defined('DEFAULT_ADULT_COUNT')) define('DEFAULT_ADULT_COUNT', 2);
if (!defined('DEFAULT_CHILD_COUNT')) define('DEFAULT_CHILD_COUNT', 0);
if (!defined('DEFAULT_OCCUPANCY')) define('DEFAULT_OCCUPANCY', 2);

// =============================================
// CACHE KEYS
// =============================================
if (!defined('CACHE_ROOM_TYPES')) define('CACHE_ROOM_TYPES', 'room_types');
if (!defined('CACHE_ROOMS')) define('CACHE_ROOMS', 'rooms');
if (!defined('CACHE_RATES')) define('CACHE_RATES', 'rates');
if (!defined('CACHE_SEASONS')) define('CACHE_SEASONS', 'seasons');
if (!defined('CACHE_SETTINGS')) define('CACHE_SETTINGS', 'settings');
if (!defined('CACHE_PERMISSIONS')) define('CACHE_PERMISSIONS', 'permissions');
if (!defined('CACHE_PRODUCTS')) define('CACHE_PRODUCTS', 'products');
if (!defined('CACHE_CATEGORIES')) define('CACHE_CATEGORIES', 'categories');
if (!defined('CACHE_OUTLETS')) define('CACHE_OUTLETS', 'outlets');

// =============================================
// API CONSTANTS
// =============================================
if (!defined('API_SUCCESS')) define('API_SUCCESS', 'success');
if (!defined('API_ERROR')) define('API_ERROR', 'error');
if (!defined('API_WARNING')) define('API_WARNING', 'warning');
if (!defined('API_INFO')) define('API_INFO', 'info');

if (!defined('API_RESPONSE_CODES')) define('API_RESPONSE_CODES', serialize([
    'success' => 200,
    'created' => 201,
    'accepted' => 202,
    'bad_request' => 400,
    'unauthorized' => 401,
    'forbidden' => 403,
    'not_found' => 404,
    'method_not_allowed' => 405,
    'validation_error' => 422,
    'server_error' => 500
]));

// =============================================
// CHART COLORS
// =============================================
if (!defined('CHART_COLORS')) define('CHART_COLORS', serialize([
    '#1abc9c', '#3498db', '#9b59b6', '#e74c3c', '#f39c12',
    '#2ecc71', '#e67e22', '#1abc9c', '#34495e', '#16a085',
    '#27ae60', '#2980b9', '#8e44ad', '#2c3e50', '#d35400',
    '#7f8c8d', '#95a5a6', '#bdc3c7', '#ecf0f1', '#f1c40f'
]));

// =============================================
// EXPORT FORMATS
// =============================================
if (!defined('EXPORT_PDF')) define('EXPORT_PDF', 'pdf');
if (!defined('EXPORT_EXCEL')) define('EXPORT_EXCEL', 'excel');
if (!defined('EXPORT_CSV')) define('EXPORT_CSV', 'csv');
if (!defined('EXPORT_HTML')) define('EXPORT_HTML', 'html');

if (!defined('EXPORT_FORMATS')) define('EXPORT_FORMATS', serialize([
    EXPORT_PDF => 'PDF',
    EXPORT_EXCEL => 'Excel',
    EXPORT_CSV => 'CSV',
    EXPORT_HTML => 'HTML'
]));