31 lines
539 B
PHP
31 lines
539 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use App\HistoryAction;
|
||
|
use App\UuidId;
|
||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class History extends Model
|
||
|
{
|
||
|
use HasFactory, UuidId;
|
||
|
|
||
|
protected $fillable = [
|
||
|
'model_id',
|
||
|
'model_name',
|
||
|
'before',
|
||
|
'after',
|
||
|
'action',
|
||
|
];
|
||
|
|
||
|
protected function casts()
|
||
|
{
|
||
|
return [
|
||
|
'action' => HistoryAction::class,
|
||
|
'before' => 'array',
|
||
|
'after' => 'array',
|
||
|
];
|
||
|
}
|
||
|
}
|