<?php

namespace App\Http\Requests\V1\Stat;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'domain' => 'required|string|in:sales,finance,production,inventory,quote,hr,system',
            'start_date' => 'required|date|date_format:Y-m-d',
            'end_date' => 'required|date|date_format:Y-m-d|after_or_equal:start_date',
        ];
    }
}
