Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
AccountCredentialMapper | 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\Admin\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\Admin\Models; |
16 | |
17 | /** |
18 | * Account mapper class. |
19 | * |
20 | * @package Modules\Admin\Models |
21 | * @license OMS License 2.0 |
22 | * @link https://jingga.app |
23 | * @since 1.0.0 |
24 | * |
25 | * @template T of Account |
26 | * @extends AccountMapper<Account> |
27 | */ |
28 | final class AccountCredentialMapper extends AccountMapper |
29 | { |
30 | /** |
31 | * Columns. |
32 | * |
33 | * @var array<string, array{name:string, type:string, internal:string, autocomplete?:bool, readonly?:bool, writeonly?:bool, annotations?:array}> |
34 | * @since 1.0.0 |
35 | */ |
36 | public const COLUMNS = [ |
37 | 'account_id' => ['name' => 'account_id', 'type' => 'int', 'internal' => 'id'], |
38 | 'account_status' => ['name' => 'account_status', 'type' => 'int', 'internal' => 'status'], |
39 | 'account_type' => ['name' => 'account_type', 'type' => 'int', 'internal' => 'type'], |
40 | 'account_login' => ['name' => 'account_login', 'type' => 'string', 'internal' => 'login', 'autocomplete' => true], |
41 | 'account_name1' => ['name' => 'account_name1', 'type' => 'string', 'internal' => 'name1', 'autocomplete' => true, 'annotations' => ['gdpr' => true]], |
42 | 'account_name2' => ['name' => 'account_name2', 'type' => 'string', 'internal' => 'name2', 'autocomplete' => true, 'annotations' => ['gdpr' => true]], |
43 | 'account_name3' => ['name' => 'account_name3', 'type' => 'string', 'internal' => 'name3', 'autocomplete' => true, 'annotations' => ['gdpr' => true]], |
44 | 'account_password' => ['name' => 'account_password', 'type' => 'string', 'internal' => 'password', 'writeonly' => true], |
45 | 'account_password_temp' => ['name' => 'account_password_temp', 'type' => 'string', 'internal' => 'tempPassword', 'writeonly' => true], |
46 | 'account_password_temp_limit' => ['name' => 'account_password_temp_limit', 'type' => 'DateTimeImmutable', 'internal' => 'tempPasswordLimit'], |
47 | 'account_email' => ['name' => 'account_email', 'type' => 'string', 'internal' => 'email', 'autocomplete' => true, 'annotations' => ['gdpr' => true]], |
48 | 'account_tries' => ['name' => 'account_tries', 'type' => 'int', 'internal' => 'tries'], |
49 | 'account_lactive' => ['name' => 'account_lactive', 'type' => 'DateTime', 'internal' => 'lastActive'], |
50 | 'account_localization' => ['name' => 'account_localization', 'type' => 'int', 'internal' => 'l11n'], |
51 | 'account_created_at' => ['name' => 'account_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], |
52 | ]; |
53 | |
54 | /** |
55 | * Model to use by the mapper. |
56 | * |
57 | * @var class-string<T> |
58 | * @since 1.0.0 |
59 | */ |
60 | public const MODEL = Account::class; |
61 | } |