44 lines
910 B
PHP
44 lines
910 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\ItemMaster;
|
||
|
|
|
||
|
|
use App\Traits\BelongsToTenant;
|
||
|
|
use App\Traits\ModelTrait;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class ItemPage extends Model
|
||
|
|
{
|
||
|
|
use BelongsToTenant, ModelTrait, SoftDeletes;
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'tenant_id',
|
||
|
|
'page_name',
|
||
|
|
'item_type',
|
||
|
|
'absolute_path',
|
||
|
|
'is_active',
|
||
|
|
'created_by',
|
||
|
|
'updated_by',
|
||
|
|
'deleted_by',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'is_active' => 'boolean',
|
||
|
|
'created_at' => 'datetime',
|
||
|
|
'updated_at' => 'datetime',
|
||
|
|
'deleted_at' => 'datetime',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $hidden = [
|
||
|
|
'deleted_by',
|
||
|
|
'deleted_at',
|
||
|
|
];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 페이지의 섹션 목록
|
||
|
|
*/
|
||
|
|
public function sections()
|
||
|
|
{
|
||
|
|
return $this->hasMany(ItemSection::class, 'page_id')->orderBy('order_no');
|
||
|
|
}
|
||
|
|
}
|