2025-08-22 15:57:14 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Commons;
|
|
|
|
|
|
|
|
|
|
use App\Traits\BelongsToTenant;
|
|
|
|
|
use App\Traits\ModelTrait;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class CategoryLog extends Model
|
|
|
|
|
{
|
|
|
|
|
use BelongsToTenant, ModelTrait;
|
|
|
|
|
|
|
|
|
|
protected $table = 'category_logs';
|
2025-11-06 17:45:49 +09:00
|
|
|
|
2025-08-22 15:57:14 +09:00
|
|
|
public $timestamps = false; // changed_at 컬럼 단일 사용
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
2025-11-06 17:45:49 +09:00
|
|
|
'category_id', 'tenant_id', 'action', 'changed_by', 'changed_at',
|
|
|
|
|
'before_json', 'after_json', 'remarks',
|
2025-08-22 15:57:14 +09:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
2025-11-06 17:45:49 +09:00
|
|
|
'changed_at' => 'datetime',
|
2025-08-22 15:57:14 +09:00
|
|
|
'before_json' => 'array',
|
2025-11-06 17:45:49 +09:00
|
|
|
'after_json' => 'array',
|
2025-08-22 15:57:14 +09:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function category()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Category::class);
|
|
|
|
|
}
|
|
|
|
|
}
|