<?php

namespace App\Http\Requests\V3\Dashboard\Harim\HarimOffice;

use App\Enums\HarimStates;
use Illuminate\Foundation\Http\FormRequest;

class FileRejectedRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
            $this->harim->state_id == HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'expert_description' => 'required|string',
        ];
    }
}
