12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace app\bug\model;
- class Moudel extends Base
- {
- // protected $name="Model";
- //设置字段信息
- protected $schema = [
- 'id' =>'int',//
- 'name' =>'varchar',//模块名称
- 'pid' =>'int',//父级id
- 'level' =>'int',//层级
- 'company_name' =>'varchar',//公司平台名称
- 'company_type' =>'varchar',//公司平台类别
- 'weight' =>'double',//
- 'status' =>'int',//0启用1禁用 状态
- 'is_del' =>'bigint',//是否删除
- 'addtime' =>'datetime',//添加时间
- 'updatetime' =>'datetime',//更新时间
- ];
-
- protected $updateTime='updatetime';
- protected $createTime='addtime';
-
- public static function GetModelByCid($cid,$type){
- switch ($type){
- case 1:
- $Model = \app\admin\model\AdminMenu::GetMenuBySecod($cid);
- break;
- case 2:
- $Model = \app\cxinv\model\AdminMenu::GetMenuBySecod($cid);
- break;
- case 3:
- $Model = \app\admin\model\AdminMenu::GetMenuBySecod($cid);
- break;
- default:
- $Model=[];
- break;
- }
- return $Model;
- }
- }
|