初始化本地仓库
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\dao\system;
|
||||
|
||||
use app\model\system\Feedback;
|
||||
use core\base\BaseDao;
|
||||
|
||||
class FeedbackDao extends BaseDao
|
||||
{
|
||||
protected function setModel(): string
|
||||
{
|
||||
return Feedback::class;
|
||||
}
|
||||
|
||||
public function getKeywordFields(): array
|
||||
{
|
||||
return ['content', 'contact'];
|
||||
}
|
||||
|
||||
public function selectModel(
|
||||
array $where,
|
||||
array|string $field = '*',
|
||||
int $page = 0,
|
||||
int $limit = 0,
|
||||
string $order = '',
|
||||
array $with = [],
|
||||
bool $search = false,
|
||||
?array $withoutScopes = null
|
||||
): \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Pagination\LengthAwarePaginator|null {
|
||||
return parent::selectModel($where, $field, $page, $limit, $order, ['createds', 'replyAdmin'], $search, $withoutScopes);
|
||||
}
|
||||
|
||||
public function get($id, ?array $field = null, ?array $with = [], string $order = '', ?array $withoutScopes = null): ?\Illuminate\Database\Eloquent\Model
|
||||
{
|
||||
return parent::get($id, $field, ['createds', 'replyAdmin'], $order, $withoutScopes);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user