<?php

namespace App\Core\Repository\Permission;

use App\Core\Repository\EleqouentAbstractRepository;
use App\Models\Permission;
use App\Models\PermissionMenuModel;

class PermissionRepository extends EleqouentAbstractRepository
{
    private $permission;
    private $permissionMenuModel;

    public function __construct(Permission $permission, PermissionMenuModel $permissionMenuModel)
    {
        parent::__construct();
        $this->permission = $permission;
        $this->permissionMenuModel = $permissionMenuModel;
        $this->defaultModel = $this->permission;
    }

    public function permissionMenuModelFindByCriteria ( array $params )
    {
        return $this->findByCriteria($this->permissionMenuModel,$params);
    }

}
