Total Complexity | 4 |
Total Lines | 39 |
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 | ]; |
||
28 | |||
29 | public function organization() |
||
30 | { |
||
31 | return $this->belongsTo(TestOrganization::class, 'organization_id', 'organization_id'); |
||
32 | } |
||
33 | |||
34 | public function role() |
||
37 | } |
||
38 | |||
39 | public function binary_role() |
||
40 | { |
||
41 | return $this->belongsTo(TestBinaryRole::class, 'binary_role_id', 'role_id'); |
||
42 | } |
||
43 | |||
44 | public function hex_binary_role() |
||
47 | } |
||
48 | } |
||
49 |