new helpdesk module

This commit is contained in:
Mark Gregory
2026-06-12 10:10:52 +01:00
parent 28a34cfa87
commit 67faed6165
26 changed files with 630 additions and 11 deletions
+9 -2
View File
@@ -6,6 +6,7 @@ namespace Modules\Helpdesk\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
@@ -17,10 +18,16 @@ final class Project extends Model
protected $table = 'helpdesk_projects';
/** @var list<string> */
protected $fillable = ['title', 'slug', 'color', 'description', 'archived_at'];
protected $fillable = ['company_id', 'team_id', 'title', 'slug', 'color', 'description', 'archived_at'];
/** @var array<string, string> */
protected $casts = ['archived_at' => 'datetime'];
protected $casts = ['company_id' => 'integer', 'team_id' => 'integer', 'archived_at' => 'datetime'];
/** @return BelongsTo<Team, Project> */
public function team(): BelongsTo
{
return $this->belongsTo(Team::class, 'team_id');
}
/** @return HasMany<Ticket> */
public function tickets(): HasMany