<?php

namespace App\Http\Requests\WorkOrder;

use App\Models\Production\WorkOrder;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class WorkOrderStatusRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

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

    public function messages(): array
    {
        return [
            'status.required' => __('validation.required', ['attribute' => '상태']),
            'status.in' => __('validation.in', ['attribute' => '상태']),
        ];
    }
}
