Add Team model and controller from upstream

This commit is contained in:
Remco
2026-01-24 21:08:40 +01:00
parent e233b55c34
commit 858143a69e
3 changed files with 66 additions and 11 deletions
@@ -0,0 +1,32 @@
<?php
namespace App\Models\Community\Teams;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
class WebsiteTeam extends Model
{
protected $table = 'website_teams';
protected $fillable = [
'name',
'description',
'rank_name',
'is_active',
];
protected $casts = [
'is_active' => 'boolean',
];
public function applications(): HasMany
{
return $this->hasMany(\App\Models\Community\Staff\WebsiteStaffApplications::class, 'team_id');
}
public function openPositions(): HasMany
{
return $this->hasMany(\App\Models\Community\Staff\WebsiteOpenPosition::class, 'team_id');
}
}