<?php

namespace App\Http\Requests\Promotions;

use App\Http\Requests\ApiFormRequest;

class EvaluateEligibilityRequest extends ApiFormRequest
{
    public function rules(): array
    {
        return [
            'scope' => ['nullable', 'string', 'in:student,class_section,school_year'],
            'student_id' => ['nullable', 'integer', 'min:1', 'required_if:scope,student'],
            'class_section_id' => ['nullable', 'integer', 'min:1', 'required_if:scope,class_section'],
            'current_school_year' => ['nullable', 'string', 'max:9'],
        ];
    }
}
