* +---------------------------------------------------------------------- */ /** * 分享列表 * @author crud自动生成代码 * @date 2025/03/17 16:22:48 */ namespace app\dao\crud; use app\dao\BaseDao; use app\model\crud\ShareList; /** * Class ShareListDao * @date 2025/03/17 * @package app\dao\crud */ class ShareListDao extends BaseDao { /** * 设置模型 * @return string * @date 2025/03/17 */ protected function setModel(): string { return ShareList::class; } /** * 搜索 * @param array $where * @return \crmeb\basic\BaseModel * @throws \ReflectionException * @date {%DATE%} */ public function searchCrudModel(array $where = [], $field = ['*'], string $order = '', array $with = []) { return $this->getModel()->field($field)->when($order !== '', function ($query) use ($order) { $query->order($order); })->when($with, function ($query) use ($with) { $query->with($with); }); } }