45 lines
668 B
PHP
45 lines
668 B
PHP
<?php
|
|
|
|
|
|
|
|
|
|
namespace app\common\model\system\auth;
|
|
|
|
|
|
use app\common\model\BaseModel;
|
|
|
|
class Menu extends BaseModel
|
|
{
|
|
/**
|
|
* @return string
|
|
* @author xaboy
|
|
* @day 2020-03-30
|
|
*/
|
|
public static function tablePk(): string
|
|
{
|
|
return 'menu_id';
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
* @author xaboy
|
|
* @day 2020-03-30
|
|
*/
|
|
public static function tableName(): string
|
|
{
|
|
return 'system_menu';
|
|
}
|
|
|
|
public function searchMenuIdAttr($query,$value)
|
|
{
|
|
$query->where('menu_id', $value);
|
|
}
|
|
|
|
public function searchRouteAttr($query,$value)
|
|
{
|
|
$query->where('route', $value);
|
|
}
|
|
|
|
|
|
}
|