This commit is contained in:
Saufi
2026-06-02 17:35:45 +08:00
commit 4ef99b1f81
148 changed files with 21134 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ProjectCollaborator extends Model
{
protected $fillable = ['project_id', 'user_id', 'role', 'added_by'];
public function project(): BelongsTo
{
return $this->belongsTo(TranscriptionProject::class, 'project_id');
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function addedByUser(): BelongsTo
{
return $this->belongsTo(User::class, 'added_by');
}
}