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