<?php

namespace App\Http\Requests\Quality;

use Illuminate\Foundation\Http\FormRequest;

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

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

    public function messages(): array
    {
        return [
            'ids.required' => __('validation.required', ['attribute' => '실적신고 ID']),
            'memo.required' => __('validation.required', ['attribute' => '메모']),
        ];
    }
}
