new_naweigete/crmeb/app/dao/crud/ShareListDao.php

60 lines
1.6 KiB
PHP
Raw Permalink Normal View History

2025-03-19 17:40:04 +08:00
<?php
/**
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者助力企业发展 ]
* +----------------------------------------------------------------------
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
* | Author: CRMEB Team <admin@crmeb.com>
* +----------------------------------------------------------------------
*/
/**
* 分享列表
* @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);
});
}
}