<?php

namespace App\Http\Requests;

use App\Http\Requests\ApiFormRequest;

class StoreStudentAssignmentRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true; // add policy/permission check if needed
    }

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