Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
CurrencyMapper | 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 phpOMS\Localization\Defaults |
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 phpOMS\Localization\Defaults; |
16 | |
17 | use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; |
18 | |
19 | /** |
20 | * Mapper class. |
21 | * |
22 | * @package phpOMS\Localization\Defaults |
23 | * @license OMS License 2.0 |
24 | * @link https://jingga.app |
25 | * @since 1.0.0 |
26 | * |
27 | * @template T of Currency |
28 | * @extends DataMapperFactory<T> |
29 | */ |
30 | final class CurrencyMapper 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 | 'currency_id' => ['name' => 'currency_id', 'type' => 'int', 'internal' => 'id'], |
40 | 'currency_name' => ['name' => 'currency_name', 'type' => 'string', 'internal' => 'name'], |
41 | 'currency_code' => ['name' => 'currency_code', 'type' => 'string', 'internal' => 'code'], |
42 | 'currency_number' => ['name' => 'currency_number', 'type' => 'string', 'internal' => 'number'], |
43 | 'currency_symbol' => ['name' => 'currency_symbol', 'type' => 'string', 'internal' => 'symbol'], |
44 | 'currency_subunits' => ['name' => 'currency_subunits', 'type' => 'int', 'internal' => 'subunits'], |
45 | 'currency_decimal' => ['name' => 'currency_decimal', 'type' => 'string', 'internal' => 'decimals'], |
46 | 'currency_countries' => ['name' => 'currency_countries', 'type' => 'string', 'internal' => 'countries'], |
47 | ]; |
48 | |
49 | /** |
50 | * Primary table. |
51 | * |
52 | * @var string |
53 | * @since 1.0.0 |
54 | */ |
55 | public const TABLE = 'currency'; |
56 | |
57 | /** |
58 | * Primary field name. |
59 | * |
60 | * @var string |
61 | * @since 1.0.0 |
62 | */ |
63 | public const PRIMARYFIELD = 'currency_id'; |
64 | } |