<?php

namespace App\Http\Requests\Labor;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'ids' => ['required', 'array', 'min:1'],
            'ids.*' => ['required', 'integer', 'exists:labors,id'],
        ];
    }

    public function messages(): array
    {
        return [
            'ids.required' => __('validation.required', ['attribute' => '삭제 대상']),
            'ids.array' => __('validation.array', ['attribute' => '삭제 대상']),
            'ids.min' => __('validation.min.array', ['attribute' => '삭제 대상', 'min' => 1]),
            'ids.*.exists' => __('validation.exists', ['attribute' => '노임 ID']),
        ];
    }
}
