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,36 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class TranscriptVersion extends Model
{
public $timestamps = false;
protected $fillable = [
'project_id',
'edited_by',
'version_number',
'old_text',
'new_text',
'change_summary',
'created_at',
];
protected function casts(): array
{
return ['created_at' => 'datetime'];
}
public function project(): BelongsTo
{
return $this->belongsTo(TranscriptionProject::class, 'project_id');
}
public function editor(): BelongsTo
{
return $this->belongsTo(User::class, 'edited_by');
}
}