Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| BillTypeL11nMapper | 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\Billing\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\Billing\Models; |
| 16 | |
| 17 | use phpOMS\DataStorage\Database\Mapper\DataMapperFactory; |
| 18 | use phpOMS\Localization\BaseStringL11n; |
| 19 | |
| 20 | /** |
| 21 | * Bill type mapper class. |
| 22 | * |
| 23 | * @package Modules\Billing\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 | */ |
| 31 | final class BillTypeL11nMapper 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 | 'billing_type_l11n_id' => ['name' => 'billing_type_l11n_id', 'type' => 'int', 'internal' => 'id'], |
| 41 | 'billing_type_l11n_name' => ['name' => 'billing_type_l11n_name', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true], |
| 42 | 'billing_type_l11n_type' => ['name' => 'billing_type_l11n_type', 'type' => 'int', 'internal' => 'ref'], |
| 43 | 'billing_type_l11n_language' => ['name' => 'billing_type_l11n_language', 'type' => 'string', 'internal' => 'language'], |
| 44 | ]; |
| 45 | |
| 46 | /** |
| 47 | * Primary table. |
| 48 | * |
| 49 | * @var string |
| 50 | * @since 1.0.0 |
| 51 | */ |
| 52 | public const TABLE = 'billing_type_l11n'; |
| 53 | |
| 54 | /** |
| 55 | * Primary field name. |
| 56 | * |
| 57 | * @var string |
| 58 | * @since 1.0.0 |
| 59 | */ |
| 60 | public const PRIMARYFIELD = 'billing_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 | } |