SharedProsperityGroupDao.php 610 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\dao\shared;
  3. use app\common\dao\BaseDao;
  4. use app\common\model\BaseModel;
  5. use app\common\model\shared\SharedProsperityGroup;
  6. class SharedProsperityGroupDao extends BaseDao
  7. {
  8. /**
  9. * @return BaseModel
  10. */
  11. protected function getModel(): string
  12. {
  13. return SharedProsperityGroup::class;
  14. }
  15. /**
  16. * 获取所有团队配置
  17. * @return array
  18. */
  19. public function getAllGroups(): array
  20. {
  21. try {
  22. return $this->getModel()::select()->toArray();
  23. } catch (\Exception $e) {
  24. return [];
  25. }
  26. }
  27. }