33 lines
599 B
PHP
33 lines
599 B
PHP
<?php
|
|
|
|
namespace App\Domain\Catalog;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class IdentityChange extends Model
|
|
{
|
|
protected $fillable = [
|
|
'subject_type',
|
|
'subject_id',
|
|
'field',
|
|
'before',
|
|
'after',
|
|
'actor_id',
|
|
'occurred_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'occurred_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function actor(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'actor_id');
|
|
}
|
|
}
|