Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
8 | class TestBinaryUser extends Model |
||
9 | { |
||
10 | use HasCompositePrimaryKey; |
||
|
|||
11 | |||
12 | protected $table = 'binary_users'; |
||
13 | |||
14 | public $timestamps = false; |
||
15 | |||
16 | protected $binaryColumns = [ |
||
17 | 'user_id', |
||
18 | ]; |
||
19 | |||
20 | protected $primaryKey = [ |
||
21 | 'user_id', |
||
22 | 'organization_id', |
||
23 | ]; |
||
24 | |||
25 | protected $fillable = [ |
||
26 | 'name', |
||
27 | 'counter', |
||
28 | ]; |
||
29 | |||
30 | public function organization() |
||
31 | { |
||
32 | return $this->belongsTo(TestOrganization::class, 'organization_id', 'organization_id'); |
||
33 | } |
||
34 | |||
35 | public function role() |
||
38 | } |
||
39 | |||
40 | public function binary_role() |
||
41 | { |
||
42 | return $this->belongsTo(TestBinaryRole::class, 'binary_role_id', 'role_id'); |
||
43 | } |
||
44 | |||
45 | public function hex_binary_role() |
||
48 | } |
||
49 | } |
||
50 |