| Total Complexity | 3 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| 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 | ]; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * The attributes that should type cast. |
||
| 50 | * |
||
| 51 | * @var array |
||
| 52 | */ |
||
| 53 | protected $casts = [ |
||
| 54 | 'team_id' => 'int', |
||
| 55 | 'user_id' => 'int', |
||
| 56 | 'order' => 'int', |
||
| 57 | ]; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Create a new factory instance for the model. |
||
| 61 | * |
||
| 62 | * @return TeamFactory |
||
| 63 | */ |
||
| 64 | protected static function newFactory(): TeamFactory |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Team member's 'user' relationship. |
||
| 71 | * |
||
| 72 | * @return BelongsTo |
||
| 73 | */ |
||
| 74 | public function user() |
||
| 80 |