<?php

namespace App\Http\Requests\V1\Salary;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'ids' => ['required', 'array', 'min:1'],
            'ids.*' => ['required', 'integer'],
            'status' => ['required', 'string', 'in:scheduled,completed'],
        ];
    }

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