<?php
declare(strict_types=1);

return [
    'up' => "
        CREATE TABLE IF NOT EXISTS `special_discounts` (
            `id`                  BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
            `name_ar`             VARCHAR(200) NOT NULL,
            `name_en`             VARCHAR(200) NULL,
            `discount_percentage` DECIMAL(5,2) NOT NULL DEFAULT 0.00,
            `requires_document`   TINYINT(1) NOT NULL DEFAULT 0,
            `description`         TEXT NULL,
            `is_active`           TINYINT(1) NOT NULL DEFAULT 1,
            `created_at`          TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
            `updated_at`          TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
            `created_by`          BIGINT UNSIGNED NULL,
            `updated_by`          BIGINT UNSIGNED NULL,
            INDEX `idx_special_discounts_active` (`is_active`)
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
    ",
    'down' => "DROP TABLE IF EXISTS `special_discounts`",
];
