Moudel.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace app\bug\model;
  3. class Moudel extends Base
  4. {
  5. // protected $name="Model";
  6. //设置字段信息
  7. protected $schema = [
  8. 'id' =>'int',//
  9. 'name' =>'varchar',//模块名称
  10. 'pid' =>'int',//父级id
  11. 'level' =>'int',//层级
  12. 'company_name' =>'varchar',//公司平台名称
  13. 'company_type' =>'varchar',//公司平台类别
  14. 'weight' =>'double',//
  15. 'status' =>'int',//0启用1禁用 状态
  16. 'is_del' =>'bigint',//是否删除
  17. 'addtime' =>'datetime',//添加时间
  18. 'updatetime' =>'datetime',//更新时间
  19. ];
  20. protected $updateTime='updatetime';
  21. protected $createTime='addtime';
  22. public static function GetModelByCid($cid,$type){
  23. switch ($type){
  24. case 1:
  25. $Model = \app\admin\model\AdminMenu::GetMenuBySecod($cid);
  26. break;
  27. case 2:
  28. $Model = \app\cxinv\model\AdminMenu::GetMenuBySecod($cid);
  29. break;
  30. case 3:
  31. $Model = \app\admin\model\AdminMenu::GetMenuBySecod($cid);
  32. break;
  33. default:
  34. $Model=[];
  35. break;
  36. }
  37. return $Model;
  38. }
  39. }