<?php

namespace App\Http\Requests\Admin;

use App\Http\Requests\ApiFormRequest;

final class DrawStoreRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'draw_time' => ['required', 'string', 'max:32'],
            'start_time' => ['nullable', 'string', 'max:32'],
            'close_time' => ['nullable', 'string', 'max:32'],
            'draw_no' => ['nullable', 'string', 'max:32', 'regex:/^[0-9]{8}-[0-9]{3}$/'],
            'business_date' => ['nullable', 'date_format:Y-m-d'],
            'sequence_no' => ['nullable', 'integer', 'min:1', 'max:999'],
        ];
    }
}
