<?php

namespace App\Http\Requests\Promotions;

use App\Http\Requests\ApiFormRequest;

class SetEnrollmentDeadlineRequest extends ApiFormRequest
{
    public function rules(): array
    {
        return [
            'enrollment_deadline' => ['required', 'date_format:Y-m-d'],
            'apply_to' => ['nullable', 'string', 'in:single,school_year,filter'],
            'next_school_year' => ['nullable', 'string', 'max:9'],
            'promotion_ids' => ['nullable', 'array'],
            'promotion_ids.*' => ['integer', 'min:1'],
        ];
    }
}
