<?php

namespace App\Http\Requests\Assignment;

use App\Http\Requests\ApiFormRequest;

class StoreAssignmentRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'student_id' => ['required', 'integer', 'exists:students,id'],
            'class_section_id' => ['required', 'integer', 'exists:classSection,class_section_id'],
            'semester' => ['required', 'string', 'max:50'],
            'school_year' => ['required', 'string', 'max:50'],
            'description' => ['nullable', 'string'],
        ];
    }
}
