<?php

namespace App\Http\Requests\Document;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'template_id' => 'required|integer|exists:document_templates,id',
            'order_id' => 'required|integer|exists:orders,id',
        ];
    }

    public function messages(): array
    {
        return [
            'template_id.required' => __('validation.required', ['attribute' => '템플릿']),
            'template_id.exists' => __('validation.exists', ['attribute' => '템플릿']),
            'order_id.required' => __('validation.required', ['attribute' => '수주']),
            'order_id.exists' => __('validation.exists', ['attribute' => '수주']),
        ];
    }
}
