CleanupPlanContentRepository.php 589 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Module\Cleanup\Repositories;
  3. use App\Module\Cleanup\Models\CleanupPlanContent;
  4. use Dcat\Admin\Repositories\EloquentRepository;
  5. /**
  6. * 计划内容数据仓库
  7. *
  8. * 用于 Dcat Admin 后台管理的数据访问
  9. */
  10. class CleanupPlanContentRepository extends EloquentRepository
  11. {
  12. /**
  13. * 模型类名
  14. */
  15. protected $eloquentClass = CleanupPlanContent::class;
  16. /**
  17. * 构造函数 - 设置关联关系
  18. */
  19. public function __construct()
  20. {
  21. // 设置需要预加载的关联关系
  22. parent::__construct(['plan']);
  23. }
  24. }