<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class EntryRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'habit-id' => ['required', 'exists:habits,id'],
            'value' => ['nullable'],
            'input-date' => ['required', 'date'],
            'note' => ['nullable', 'string'],
        ];
    }

    public function authorize(): bool
    {
        return true;
    }
}
