<?php
// App/Models/WHSQE_TableOfContentGrandChild.php
namespace App\Models;

class WHSQE_TableOfContentGrandChild extends BaseModel
{
    protected $fillable = ['title', 'whsqe_table_of_content_id', 'whsqe_table_of_content_child_id', 'del','customer_id','workspace_id'];
    protected $table = 'whsqe_table_of_content_grand_child';

    protected $hidden = [
        'customer_id',
        'workspace_id',
    ];
    
    public function parent()
    {
        return $this->belongsTo(WHSQE_TableOfContent::class, 'whsqe_table_of_content_id');
    }
    
    public function grandparent()
    {
        return $this->belongsTo(WHSQE_TableOfContentChild::class, 'whsqe_table_of_content_child_id');
    }
}