| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace App\Module\Mex\Repositories;
- use App\Module\Mex\Models\MexMatchLog;
- use UCore\DcatAdmin\Repository\EloquentRepository;
- /**
- * 农贸市场撮合日志仓库
- *
- * 用于后台管理的数据访问层
- */
- class MexMatchLogRepository extends EloquentRepository
- {
- /**
- * 关联的模型类
- *
- * @var string
- */
- protected $eloquentClass = MexMatchLog::class;
- /**
- * 构造函数,支持预加载关联关系
- *
- * @param array $with 预加载的关联关系
- */
- public function __construct(array $with = [])
- {
- // 默认预加载商品信息
- $defaultWith = ['item'];
- $relations = array_merge($defaultWith, $with);
- parent::__construct($relations);
- }
- }
|