Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

585 B
Raw Blame
<?php

namespace HiEvents\Services\Domain\Message\DTO;

use HiEvents\DataTransferObjects\BaseDataObject;
use HiEvents\DomainObjects\Enums\MessagingTierViolationEnum;

class MessagingTierViolationDTO extends BaseDataObject
{
    /**
     * @param  MessagingTierViolationEnum[]  $violations
     */
    public function __construct(
        public readonly int $accountId,
        public readonly string $tierName,
        public readonly array $violations,
    ) {}

    public function getFirstViolationMessage(): string
    {
        return $this->violations[0]->getMessage();
    }
}