您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

31 行
804B

  1. <?php
  2. namespace common\logic\Document\Quotation\Repository;
  3. use common\logic\AbstractRepository;
  4. use common\logic\Document\Quotation\Model\Quotation;
  5. class QuotationRepository extends AbstractRepository
  6. {
  7. protected QuotationRepositoryQuery $query;
  8. public function loadDependencies(): void
  9. {
  10. $this->query = $this->loadService(QuotationRepositoryQuery::class);
  11. }
  12. public function getDefaultOptionsSearch(): array
  13. {
  14. return [
  15. 'with' => [],
  16. 'join_with' => ['user AS user_quotation', 'producer'],
  17. 'orderby' => 'date ASC',
  18. 'attribute_id_producer' => 'quotation.id_producer'
  19. ];
  20. }
  21. public function findOneQuotationById(int $id): ?Quotation
  22. {
  23. return Quotation::searchOne(['id' => $id]);
  24. }
  25. }