This commit is contained in:
2026-07-21 23:39:19 +02:00
commit b33b217bdb
217 changed files with 32076 additions and 0 deletions

27
src/app/Models/Team.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
#[Fillable(['name'])]
class Team extends Model
{
public function members(): BelongsToMany
{
return $this->belongsToMany(User::class, 'team_user');
}
public function subcategories(): BelongsToMany
{
return $this->belongsToMany(Subcategory::class, 'team_subcategory');
}
public function tickets(): HasMany
{
return $this->hasMany(Ticket::class);
}
}