-- Table: cancel_reasons
-- Predefined cancellation reasons for users, drivers, and dispatchers

CREATE TABLE `cancel_reasons` (
  `id` int UNSIGNED NOT NULL,
  `merchant_id` int UNSIGNED DEFAULT NULL,
  `reason_type` int NOT NULL COMMENT '1 : USER, 2 : DRIVER, 3 :dispatcher, 4: BUSINESS SEGMENT',
  `reason_status` int NOT NULL,
  `is_driver_requested` tinyint(1) NOT NULL DEFAULT '0',
  `is_legitimate_driver_cancel` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `segment_id` int UNSIGNED DEFAULT NULL,
  `allow_reassignment` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Permet la reassignation de la course apres annulation avec cette raison'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Primary key and indexes would be added via ALTER TABLE statements
