oms-Support/Models/TicketAttribute.php
2023-06-17 03:13:35 +02:00

91 lines
1.6 KiB
PHP
Executable File

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