Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
TaskAttributeTypeL11nMapper
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2/**
3 * Jingga
4 *
5 * PHP Version 8.1
6 *
7 * @package   Modules\Tasks\Models
8 * @copyright Dennis Eichhorn
9 * @license   OMS License 2.0
10 * @version   1.0.0
11 * @link      https://jingga.app
12 */
13declare(strict_types=1);
14
15namespace Modules\Tasks\Models;
16
17use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
18use phpOMS\Localization\BaseStringL11n;
19
20/**
21 * Task mapper class.
22 *
23 * @package Modules\Tasks\Models
24 * @license OMS License 2.0
25 * @link    https://jingga.app
26 * @since   1.0.0
27 *
28 * @template T of BaseStringL11n
29 * @extends DataMapperFactory<T>
30 */
31final class TaskAttributeTypeL11nMapper extends DataMapperFactory
32{
33    /**
34     * Columns.
35     *
36     * @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}>
37     * @since 1.0.0
38     */
39    public const COLUMNS = [
40        'task_attr_type_l11n_id'    => ['name' => 'task_attr_type_l11n_id',    'type' => 'int',    'internal' => 'id'],
41        'task_attr_type_l11n_title' => ['name' => 'task_attr_type_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
42        'task_attr_type_l11n_type'  => ['name' => 'task_attr_type_l11n_type',  'type' => 'int',    'internal' => 'ref'],
43        'task_attr_type_l11n_lang'  => ['name' => 'task_attr_type_l11n_lang',  'type' => 'string', 'internal' => 'language'],
44    ];
45
46    /**
47     * Primary table.
48     *
49     * @var string
50     * @since 1.0.0
51     */
52    public const TABLE = 'task_attr_type_l11n';
53
54    /**
55     * Primary field name.
56     *
57     * @var string
58     * @since 1.0.0
59     */
60    public const PRIMARYFIELD = 'task_attr_type_l11n_id';
61
62    /**
63     * Model to use by the mapper.
64     *
65     * @var class-string<T>
66     * @since 1.0.0
67     */
68    public const MODEL = BaseStringL11n::class;
69}