feat(bookstack) : add TaskBookStackLink entity and repository
This commit is contained in:
23
src/Repository/TaskBookStackLinkRepository.php
Normal file
23
src/Repository/TaskBookStackLinkRepository.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\TaskBookStackLink;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
class TaskBookStackLinkRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, TaskBookStackLink::class);
|
||||
}
|
||||
|
||||
/** @return TaskBookStackLink[] */
|
||||
public function findByTaskId(int $taskId): array
|
||||
{
|
||||
return $this->findBy(['task' => $taskId], ['createdAt' => 'DESC']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user