<?php

namespace App\Exceptions;

use RuntimeException;

/**
 * 下注业务失败异常，由 Ticket 控制器捕获并转为统一 JSON。
 */
final class TicketOperationException extends RuntimeException
{
    public function __construct(
        string $message,
        public readonly int $lotteryCode,
        public readonly int $httpStatus = 400,
        public readonly mixed $payload = null,
    ) {
        parent::__construct($message);
    }
}
