hyperf-view/builder/Generator/Stubs/Single/mapper.stub

45 lines
930 B
Plaintext

<?php
declare(strict_types=1);
/**
* MineAdmin is committed to providing solutions for quickly building web applications
* Please view the LICENSE file that was distributed with this source code,
* For the full copyright and license information.
* Thank you very much for using MineAdmin.
*
* @Author X.Mo<root@imoi.cn>
* @Link https://gitee.com/xmo/MineAdmin
*/
namespace {NAMESPACE};
{USE}
use Hyperf\Database\Model\Builder;
use Builder\Abstracts\AbstractMapper;
/**
* {COMMENT}
*/
class {CLASS_NAME} extends AbstractMapper
{
/**
* @var {MODEL}
*/
public $model;
public function assignModel()
{
$this->model = {MODEL}::class;
}
/**
* 搜索处理器
* @param Builder $query
* @param array $params
* @return Builder
*/
public function handleSearch(Builder $query, array $params): Builder
{
{SEARCH}
return $query;
}
}