<?php

namespace App\Http\Requests\Coach;

use Illuminate\Foundation\Http\FormRequest;

class NutritionMealRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()->isCoach();
    }

    public function rules(): array
    {
        return [
            'name' => ['required', 'string', 'max:100'],
            'consumption_time' => ['nullable', 'date_format:H:i'],
        ];
    }
}
