mirror of
https://github.com/Karaka-Management/oms-Support.git
synced 2026-01-11 09:08:40 +00:00
71 lines
1.5 KiB
PHP
71 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.2
|
|
*
|
|
* @package Modules\Support\Models
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link https://orange-management.org
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Support\Models;
|
|
|
|
use Modules\Tasks\Models\TaskMapper;
|
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
|
|
|
/**
|
|
* Mapper class.
|
|
*
|
|
* @package Modules\Support\Models
|
|
* @license OMS License 1.0
|
|
* @link https://orange-management.org
|
|
* @since 1.0.0
|
|
*/
|
|
final class TicketMapper extends DataMapperAbstract
|
|
{
|
|
|
|
/**
|
|
* Columns.
|
|
*
|
|
* @var array<string, array<string, bool|string>>
|
|
* @since 1.0.0
|
|
*/
|
|
protected static $columns = [
|
|
'support_ticket_id' => ['name' => 'support_ticket_id', 'type' => 'int', 'internal' => 'id'],
|
|
'support_ticket_task' => ['name' => 'support_ticket_task', 'type' => 'int', 'internal' => 'task'],
|
|
];
|
|
|
|
/**
|
|
* Has one relation.
|
|
*
|
|
* @var array<string, array<string, string>>
|
|
* @since 1.0.0
|
|
*/
|
|
protected static $ownsOne = [
|
|
'task' => [
|
|
'mapper' => TaskMapper::class,
|
|
'src' => 'support_ticket_task',
|
|
],
|
|
];
|
|
|
|
/**
|
|
* Primary table.
|
|
*
|
|
* @var string
|
|
* @since 1.0.0
|
|
*/
|
|
protected static $table = 'support_ticket';
|
|
|
|
/**
|
|
* Primary field name.
|
|
*
|
|
* @var string
|
|
* @since 1.0.0
|
|
*/
|
|
protected static $primaryField = 'support_ticket_id';
|
|
}
|