<?php

namespace App\Http\Requests\Pricing;

use Illuminate\Foundation\Http\FormRequest;

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

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

    public function messages(): array
    {
        return [
            'ids.required' => __('validation.required', ['attribute' => 'ids']),
            'ids.array' => __('validation.array', ['attribute' => 'ids']),
            'ids.min' => __('validation.min.array', ['attribute' => 'ids', 'min' => 1]),
            'ids.*.required' => __('validation.required', ['attribute' => 'id']),
            'ids.*.integer' => __('validation.integer', ['attribute' => 'id']),
        ];
    }
}
