SystemRouteCate.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * +----------------------------------------------------------------------
  4. * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  5. * +----------------------------------------------------------------------
  6. * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  7. * +----------------------------------------------------------------------
  8. * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  9. * +----------------------------------------------------------------------
  10. * | Author: CRMEB Team <admin@crmeb.com>
  11. * +----------------------------------------------------------------------
  12. */
  13. namespace app\model\system;
  14. use crmeb\basic\BaseModel;
  15. class SystemRouteCate extends BaseModel
  16. {
  17. /**
  18. * @var string
  19. */
  20. protected $name = 'system_route_cate';
  21. /**
  22. * @var string
  23. */
  24. protected $pk = 'id';
  25. /**
  26. * @author 等风来
  27. * @email 136327134@qq.com
  28. * @date 2023/4/7
  29. * @return \think\model\relation\HasMany
  30. */
  31. public function children()
  32. {
  33. return $this->hasMany(SystemRoute::class, 'id', 'cate_id')->field(['id', 'cate_id', 'name', 'path', 'method'])->order('add_time desc');
  34. }
  35. }