<?php
declare(strict_types=1);

return [
    'up' => "
CREATE TABLE IF NOT EXISTS playground_monthly_schedules (
    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    playground_id INT UNSIGNED NOT NULL,
    plan_month DATE NOT NULL,
    plan_name_ar VARCHAR(200) NOT NULL,
    status VARCHAR(20) NOT NULL DEFAULT 'draft',
    working_days_json JSON NULL,
    day_start_time TIME NOT NULL DEFAULT '07:00:00',
    day_end_time TIME NOT NULL DEFAULT '22:00:00',
    notes TEXT NULL,
    created_by INT UNSIGNED NULL,
    activated_at DATETIME NULL,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at DATETIME NULL,
    KEY idx_playground (playground_id),
    KEY idx_month (plan_month),
    KEY idx_status (status)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
    'down' => "DROP TABLE IF EXISTS playground_monthly_schedules",
];
