<?php

namespace App\Http\Requests\Bidding;

use App\Models\Bidding\Bidding;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

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

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

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