<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Status extends Model
{
    use HasFactory;

    protected $guarded = [];

    public function parent_status(){
        return $this->belongsTo('App\Models\Status','parent_id')->where('is_disabled',0);
    }
    public function sub_status(){
        return $this->hasMany('App\Models\Status','parent_id','id')->where('is_disabled',0);
    }
}
