40 lines
677 B
PHP
40 lines
677 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class TaskLog extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public const UPDATED_AT = null;
|
|
|
|
protected $fillable = [
|
|
'task_id',
|
|
'user_id',
|
|
'action',
|
|
'field_changed',
|
|
'old_value',
|
|
'new_value',
|
|
'comment',
|
|
'description',
|
|
];
|
|
|
|
protected $casts = [
|
|
'old_value' => 'array',
|
|
'new_value' => 'array',
|
|
];
|
|
|
|
public function task()
|
|
{
|
|
return $this->belongsTo(Task::class);
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|