Feat: Make some entities soft-deletable

This commit is contained in:
Björn Fromme committed 2023-10-20 17:17:21 +02:00
1 parent 168a69c103
commit d7bbb4bb29
27 files changed
+213 -63

No files matched your search

+10 -6
View File
@@ -29,12 +29,16 @@ class DestinationRepository extends ServiceEntityRepository
$qb = $this->createQueryBuilder('destination');
$dates = $qb
->where($qb->expr()->orX(
$qb->expr()->like('destination.product', ':search'),
$qb->expr()->like('destination.hotel', ':search'),
$qb->expr()->like('DATE_FORMAT(destination.dateFrom, \'%d.%m.%y\')', ':search'),
$qb->expr()->like('DATE_FORMAT(destination.dateTo, \'%d.%m.%y\')', ':search')
))
->where(
$qb->expr()->andX(
$qb->expr()->isNull('destination.deletedAt'),
$qb->expr()->orX(
$qb->expr()->like('destination.product', ':search'),
$qb->expr()->like('destination.hotel', ':search'),
$qb->expr()->like('DATE_FORMAT(destination.dateFrom, \'%d.%m.%y\')', ':search'),
$qb->expr()->like('DATE_FORMAT(destination.dateTo, \'%d.%m.%y\')', ':search')
))
)
->setParameter('search', '%'.$this->escapeLikeWildcards($search).'%')
->orderBy('destination.dateFrom', 'ASC')
->addOrderBy('destination.product', 'ASC')