oms-EventManagement/Models/EventAttribute.php
Dennis Eichhorn d1a899577d
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled
fix version and bugs
2024-05-21 00:09:10 +02:00

91 lines
1.6 KiB
PHP
Executable File

<?php
/**
* Jingga
*
* PHP Version 8.2
*
* @package Modules\EventManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 2.2
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\EventManagement\Models;
/**
* Event class.
*
* @package Modules\EventManagement\Models
* @license OMS License 2.2
* @link https://jingga.app
* @since 1.0.0
*/
class EventAttribute implements \JsonSerializable
{
/**
* Id.
*
* @var int
* @since 1.0.0
*/
public int $id = 0;
/**
* Event this attribute belongs to
*
* @var int
* @since 1.0.0
*/
public int $event = 0;
/**
* Attribute type the attribute belongs to
*
* @var EventAttributeType
* @since 1.0.0
*/
public EventAttributeType $type;
/**
* Attribute value the attribute belongs to
*
* @var EventAttributeValue
* @since 1.0.0
*/
public EventAttributeValue $value;
/**
* Constructor.
*
* @since 1.0.0
*/
public function __construct()
{
$this->type = new NullEventAttributeType();
$this->value = new NullEventAttributeValue();
}
/**
* {@inheritdoc}
*/
public function toArray() : array
{
return [
'id' => $this->id,
'event' => $this->event,
'type' => $this->type,
'value' => $this->value,
];
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return $this->toArray();
}
}