37 lines
730 B
PHP
37 lines
730 B
PHP
<?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');
|
|
}
|
|
}
|