chore: commit remaining workspace changes
This commit is contained in:
32
app/Models/AcademyLessonRevision.php
Normal file
32
app/Models/AcademyLessonRevision.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class AcademyLessonRevision extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'lesson_id',
|
||||
'user_id',
|
||||
'change_note',
|
||||
'snapshot_json',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'snapshot_json' => 'array',
|
||||
];
|
||||
|
||||
public function lesson(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(AcademyLesson::class, 'lesson_id');
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user