2023-03-24 13:54:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
class Team extends BaseModel
|
|
|
|
{
|
|
|
|
protected $casts = [
|
|
|
|
'personal_team' => 'boolean',
|
|
|
|
];
|
|
|
|
protected $fillable = [
|
2023-04-14 10:54:29 +00:00
|
|
|
'id',
|
2023-03-24 13:54:17 +00:00
|
|
|
'name',
|
2023-04-13 15:17:30 +00:00
|
|
|
'personal_team'
|
2023-03-24 13:54:17 +00:00
|
|
|
];
|
2023-04-26 13:38:50 +00:00
|
|
|
public function projects()
|
|
|
|
{
|
2023-03-27 08:44:31 +00:00
|
|
|
return $this->hasMany(Project::class);
|
|
|
|
}
|
2023-04-26 13:38:50 +00:00
|
|
|
public function servers()
|
|
|
|
{
|
2023-03-27 12:31:42 +00:00
|
|
|
return $this->hasMany(Server::class);
|
|
|
|
}
|
2023-04-26 13:38:50 +00:00
|
|
|
public function applications()
|
|
|
|
{
|
2023-03-30 17:50:27 +00:00
|
|
|
return $this->hasManyThrough(Application::class, Project::class);
|
|
|
|
}
|
2023-03-24 13:54:17 +00:00
|
|
|
}
|