fix : Category, Product 관련 테이블 정리 (Models, DB, seeder)
This commit is contained in:
30
app/Models/Commons/CategoryTemplate.php
Normal file
30
app/Models/Commons/CategoryTemplate.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Commons;
|
||||
|
||||
use App\Traits\BelongsToTenant;
|
||||
use App\Traits\ModelTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CategoryTemplate extends Model
|
||||
{
|
||||
use BelongsToTenant, ModelTrait;
|
||||
|
||||
protected $table = 'category_templates';
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id','category_id','version_no','template_json','applied_at',
|
||||
'created_by','updated_by','deleted_by','remarks',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'version_no' => 'integer',
|
||||
'template_json' => 'array',
|
||||
'applied_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user