<?php

namespace App\Http\Requests\Api;

use Illuminate\Foundation\Http\FormRequest;

class PurchaseExamPinRequest extends BaseApiRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'variation_code' => ['required', 'string'],
            'quantity' => ['required', 'integer', 'min:1', 'max:10'],
            'phone' => ['nullable', 'string', 'max:20'],
            'idempotency_key' => ['nullable', 'string', 'unique:transactions,idempotency_key'],
        ];
    }
}
