<?php

namespace App\Http\Requests\DataEntry;

use Illuminate\Foundation\Http\FormRequest;

class StoreActionRequest extends FormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'id' => ['required'],
            'reportedto' => ['required'],
            'refferedto' => ['nullable'],
            'date_reported' => ['required', 'date'],
            'date_reffered' => ['nullable', 'date'],
            'serviceid' => ['required', 'array', 'min:1'],
            'serviceid.*' => ['required'],
            'notes' => ['nullable', 'string'],
        ];
    }
}
