<?php

namespace App\Http\Requests\V1\Dashboard;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'period' => ['nullable', 'string', 'in:week,month,quarter'],
        ];
    }

    public function messages(): array
    {
        return [
            'period.in' => __('error.dashboard.invalid_period'),
        ];
    }
}
