fix : Category, Product 관련 테이블 정리 (Models, DB, seeder)
This commit is contained in:
31
app/Models/Commons/CategoryLog.php
Normal file
31
app/Models/Commons/CategoryLog.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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';
|
||||
public $timestamps = false; // changed_at 컬럼 단일 사용
|
||||
|
||||
protected $fillable = [
|
||||
'category_id','tenant_id','action','changed_by','changed_at',
|
||||
'before_json','after_json','remarks',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'changed_at' => 'datetime',
|
||||
'before_json' => 'array',
|
||||
'after_json' => 'array',
|
||||
];
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user