<?php

namespace App\Http\Requests\ClassPreparation;

use App\Http\Requests\ApiFormRequest;

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

    public function rules(): array
    {
        return [
            'school_year' => ['nullable', 'string', 'max:9'],
            'semester' => ['nullable', 'string', 'max:255'],
        ];
    }
}
