Total Complexity | 3 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
14 | class Team extends Model |
||
15 | { |
||
16 | use CacheableAll; |
||
17 | use HasFactory; |
||
18 | |||
19 | /** |
||
20 | * The "booting" method of the model. |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | protected static function boot() |
||
30 | } |
||
31 | |||
32 | protected $table = 'team'; |
||
33 | protected $primaryKey = 'team_id'; |
||
34 | |||
35 | protected $fillable = [ |
||
36 | 'team_id', |
||
37 | 'user_id', |
||
38 | 'order', |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * @var array Relationships that should be eager loaded with every query |
||
43 | */ |
||
44 | protected $with = [ |
||
45 | 'user', |
||
46 | 'user.file', |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * The attributes that should type cast. |
||
51 | * |
||
52 | * @var array |
||
53 | */ |
||
54 | protected $casts = [ |
||
55 | 'team_id' => 'int', |
||
56 | 'user_id' => 'int', |
||
57 | 'order' => 'int', |
||
58 | ]; |
||
59 | |||
60 | /** |
||
61 | * Create a new factory instance for the model. |
||
62 | * |
||
63 | * @return TeamFactory |
||
64 | */ |
||
65 | protected static function newFactory(): TeamFactory |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * Team member's 'user' relationship. |
||
72 | * |
||
73 | * @return BelongsTo |
||
74 | */ |
||
75 | public function user() |
||
81 |