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 ⭐️

1.5 KB
Raw Blame
<?php

namespace HiEvents\Services\Application\Handlers\Event\DTO;

use HiEvents\DataTransferObjects\Attributes\CollectionOf;
use HiEvents\DataTransferObjects\AttributesDTO;
use HiEvents\DataTransferObjects\BaseDTO;
use HiEvents\DomainObjects\Enums\EventCategory;
use HiEvents\DomainObjects\Enums\EventType;
use HiEvents\DomainObjects\Status\EventStatus;
use HiEvents\Services\Application\Handlers\EventSettings\DTO\UpdateEventSettingsDTO;
use HiEvents\Services\Domain\EventLocation\EventLocationData;
use Illuminate\Support\Collection;

class CreateEventDTO extends BaseDTO
{
    public function __construct(
        public readonly string $title,
        public readonly int $organizer_id,
        public readonly int $account_id,
        public readonly int $user_id,
        public readonly ?int $id = null,
        public readonly ?string $start_date = null,
        public readonly ?string $end_date = null,
        public readonly ?string $description = null,
        #[CollectionOf(AttributesDTO::class)]
        public readonly ?Collection $attributes = null,
        public readonly ?string $timezone = null,
        public readonly ?string $currency = null,
        public readonly ?EventCategory $category = null,
        public readonly ?EventLocationData $event_location = null,
        public readonly ?string $status = EventStatus::DRAFT->name,
        public readonly ?EventType $type = EventType::SINGLE,

        public ?UpdateEventSettingsDTO $event_settings = null
    ) {}
}