<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Spatie\Permission\Models\Permission as SpatiePermission;

class Permission extends SpatiePermission
{
    public function parentPermission()
    {
        return $this->belongsTo(Permission::class, 'parent');
    }

    public function childrenPermissions()
    {
        return $this->hasMany(Permission::class, 'parent');
    }
}
