<?php

namespace App\Http\Requests\Ticket;

final class TicketPlaceRequest extends TicketBetRequest
{
    /**
     * @return array<string, mixed>
     */
    public function rules(): array
    {
        return array_merge(parent::rules(), [
            'client_trace_id' => ['required', 'string', 'max:64'],
            'expected_config_versions' => ['nullable', 'array'],
            'expected_config_versions.play_config_version_no' => ['required_with:expected_config_versions', 'integer', 'min:1'],
            'expected_config_versions.odds_version_no' => ['required_with:expected_config_versions', 'integer', 'min:1'],
            'expected_config_versions.risk_cap_version_no' => ['required_with:expected_config_versions', 'integer', 'min:1'],
        ]);
    }
}
