<?php

namespace app\common\dao\shared;

use app\common\dao\BaseDao;
use app\common\model\BaseModel;
use app\common\model\shared\SharedProsperityGroup;

class SharedProsperityGroupDao extends BaseDao
{

    /**
     * @return BaseModel
     */
    protected function getModel(): string
    {
        return SharedProsperityGroup::class;
    }

    /**
     * 获取所有团队配置
     * @return array
     */
    public function getAllGroups(): array
    {
        try {
            return $this->getModel()::select()->toArray();
        } catch (\Exception $e) {
            return [];
        }
    }

}
