<?php

namespace App\Http\Requests\Inventory;

use App\Http\Requests\ApiFormRequest;

class InventoryTeacherDistributionStoreRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'item_id' => ['required', 'integer', 'min:1'],
            'class_section_id' => ['nullable', 'integer', 'min:1'],
            'student_ids' => ['required', 'array', 'min:1'],
            'student_ids.*' => ['integer', 'min:1'],
            'note' => ['nullable', 'string'],
        ];
    }
}
