<?php
declare(strict_types=1);

return [
    'up' => "
CREATE TABLE IF NOT EXISTS `board_offers` (
    `id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    `title_ar` VARCHAR(200) NOT NULL,
    `offer_type` ENUM('cash_discount','installment_terms','subscription_discount') NOT NULL,
    `discount_percentage` DECIMAL(5,2) NULL,
    `custom_months` INT NULL,
    `custom_interest_rate` DECIMAL(5,2) NULL,
    `applies_to` ENUM('membership_fee','subscription','all') NOT NULL DEFAULT 'membership_fee',
    `effective_from` DATE NOT NULL,
    `effective_to` DATE NOT NULL,
    `is_active` TINYINT(1) NOT NULL DEFAULT 1,
    `board_decision_number` VARCHAR(50) NULL,
    `board_decision_date` DATE NULL,
    `notes` TEXT NULL,
    `created_by` INT UNSIGNED NULL,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",

    'down' => "DROP TABLE IF EXISTS `board_offers`",
];
