<?php

namespace App\Http\Requests\V1\Bill;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'status' => ['required', 'string', 'in:stored,maturityAlert,maturityResult,paymentComplete,dishonored,collectionRequest,collectionComplete,suing'],
        ];
    }

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

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