<?php

namespace App\Http\Requests\Admin\Users\Student;

use App\Enums\StudentStatus;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class StudentStatusRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()->can('update-students-academic-status');
    }

    public function rules(): array
    {
        return [
            'status' => ['required', 'string', Rule::in(StudentStatus::values())],
        ];
    }
}
