CustomModuleCategory.php
904 字节
<?php
/**
* @remark :
* @name :CustomModuleCategory.php
* @author :lyh
* @method :post
* @time :2023/11/6 10:04
*/
namespace App\Models\CustomModule;
use App\Models\Base;
class CustomModuleCategory extends Base
{
protected $table = 'gl_custom_module_category';
//连接数据库
protected $connection = 'custom_mysql';
/**
* 根据路由获取模块分类及模块信息
*/
public static function getModuleCategoryAndExtendByRoute($projectId,$route)
{
return self::with("getExtend")->where("project_id",$projectId)->where("route",$route)->where("status",0)->first();
}
/**
* 根据路由获取模块分类及模块信息
*/
public static function getModuleCategoryAndExtendById($projectId,$id)
{
return self::with("getExtend")->where("project_id",$projectId)->where("id",$id)->where("status",0)->first();
}
}