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

4.2 KB
Raw Blame
<?php

namespace HiEvents\DomainObjects\Generated;

/**
 * THIS FILE IS AUTOGENERATED - DO NOT EDIT IT DIRECTLY.
 * @package HiEvents\DomainObjects\Generated
 */
abstract class AffiliateDomainObjectAbstract extends \HiEvents\DomainObjects\AbstractDomainObject
{
    final public const SINGULAR_NAME = 'affiliate';
    final public const PLURAL_NAME = 'affiliates';
    final public const ID = 'id';
    final public const EVENT_ID = 'event_id';
    final public const ACCOUNT_ID = 'account_id';
    final public const NAME = 'name';
    final public const CODE = 'code';
    final public const EMAIL = 'email';
    final public const TOTAL_SALES = 'total_sales';
    final public const TOTAL_SALES_GROSS = 'total_sales_gross';
    final public const STATUS = 'status';
    final public const CREATED_AT = 'created_at';
    final public const UPDATED_AT = 'updated_at';

    protected int $id;
    protected int $event_id;
    protected int $account_id;
    protected string $name;
    protected string $code;
    protected ?string $email = null;
    protected int $total_sales = 0;
    protected float $total_sales_gross = 0.0;
    protected string $status = 'ACTIVE';
    protected ?string $created_at = null;
    protected ?string $updated_at = null;

    public function toArray(): array
    {
        return [
                    'id' => $this->id ?? null,
                    'event_id' => $this->event_id ?? null,
                    'account_id' => $this->account_id ?? null,
                    'name' => $this->name ?? null,
                    'code' => $this->code ?? null,
                    'email' => $this->email ?? null,
                    'total_sales' => $this->total_sales ?? null,
                    'total_sales_gross' => $this->total_sales_gross ?? null,
                    'status' => $this->status ?? null,
                    'created_at' => $this->created_at ?? null,
                    'updated_at' => $this->updated_at ?? null,
                ];
    }

    public function setId(int $id): self
    {
        $this->id = $id;
        return $this;
    }

    public function getId(): int
    {
        return $this->id;
    }

    public function setEventId(int $event_id): self
    {
        $this->event_id = $event_id;
        return $this;
    }

    public function getEventId(): int
    {
        return $this->event_id;
    }

    public function setAccountId(int $account_id): self
    {
        $this->account_id = $account_id;
        return $this;
    }

    public function getAccountId(): int
    {
        return $this->account_id;
    }

    public function setName(string $name): self
    {
        $this->name = $name;
        return $this;
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function setCode(string $code): self
    {
        $this->code = $code;
        return $this;
    }

    public function getCode(): string
    {
        return $this->code;
    }

    public function setEmail(?string $email): self
    {
        $this->email = $email;
        return $this;
    }

    public function getEmail(): ?string
    {
        return $this->email;
    }

    public function setTotalSales(int $total_sales): self
    {
        $this->total_sales = $total_sales;
        return $this;
    }

    public function getTotalSales(): int
    {
        return $this->total_sales;
    }

    public function setTotalSalesGross(float $total_sales_gross): self
    {
        $this->total_sales_gross = $total_sales_gross;
        return $this;
    }

    public function getTotalSalesGross(): float
    {
        return $this->total_sales_gross;
    }

    public function setStatus(string $status): self
    {
        $this->status = $status;
        return $this;
    }

    public function getStatus(): string
    {
        return $this->status;
    }

    public function setCreatedAt(?string $created_at): self
    {
        $this->created_at = $created_at;
        return $this;
    }

    public function getCreatedAt(): ?string
    {
        return $this->created_at;
    }

    public function setUpdatedAt(?string $updated_at): self
    {
        $this->updated_at = $updated_at;
        return $this;
    }

    public function getUpdatedAt(): ?string
    {
        return $this->updated_at;
    }
}