Total Complexity | 2 |
Total Lines | 75 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
6 | class UsersAssociatedApps extends AbstractModel |
||
7 | { |
||
8 | /** |
||
9 | * |
||
10 | * @var integer |
||
11 | */ |
||
12 | public $users_id; |
||
13 | |||
14 | /** |
||
15 | * |
||
16 | * @var integer |
||
17 | */ |
||
18 | public $apps_id; |
||
19 | |||
20 | /** |
||
21 | * |
||
22 | * @var integer |
||
23 | */ |
||
24 | public $companies_id; |
||
25 | |||
26 | /** |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | public $identify_id; |
||
31 | |||
32 | /** |
||
33 | * |
||
34 | * @var integer |
||
35 | */ |
||
36 | public $user_active; |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | public $user_role; |
||
43 | |||
44 | /** |
||
45 | * Initialize method for model. |
||
46 | */ |
||
47 | 4 | public function initialize() |
|
48 | { |
||
49 | 4 | $this->belongsTo( |
|
50 | 4 | 'companies_id', |
|
51 | 4 | 'Canvas\Models\Companies', |
|
52 | 4 | 'id', |
|
53 | 4 | ['alias' => 'company'] |
|
54 | ); |
||
55 | |||
56 | 4 | $this->belongsTo( |
|
57 | 4 | 'apps_id', |
|
58 | 4 | 'Canvas\Models\Apps', |
|
59 | 4 | 'id', |
|
60 | 4 | ['alias' => 'app'] |
|
61 | ); |
||
62 | |||
63 | 4 | $this->belongsTo( |
|
64 | 4 | 'users_id', |
|
65 | 4 | 'Canvas\Models\Users', |
|
66 | 4 | 'id', |
|
67 | 4 | ['alias' => 'user'] |
|
68 | ); |
||
69 | |||
70 | 4 | $this->setSource('users_associated_apps'); |
|
71 | 4 | } |
|
72 | |||
73 | /** |
||
74 | * Returns table name mapped in the model. |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | 3 | public function getSource(): string |
|
81 | } |
||
82 | } |
||
83 |