<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'equipment_id' => 'required|exists:equipments,id',
            'template_item_id' => 'required|exists:equipment_inspection_templates,id',
            'check_date' => 'required|date',
        ];
    }

    public function attributes(): array
    {
        return [
            'equipment_id' => '설비',
            'template_item_id' => '점검항목',
            'check_date' => '점검일',
        ];
    }
}
