<?php

namespace App\Http\Requests\ClassPreparation;

use App\Http\Requests\ApiFormRequest;

class ClassPreparationAdjustmentRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return $this->user() !== null;
    }

    public function rules(): array
    {
        return [
            'class_section_id' => ['required', 'string', 'max:32'],
            'school_year' => ['nullable', 'string', 'max:9'],
            'adjustments' => ['required', 'array'],
            'adjustments.*' => ['required', 'integer'],
        ];
    }
}
