From 585cc3368f064cd11c88f23ae8cbb19e86c547ca Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 15 Mar 2026 18:05:09 +0100 Subject: [PATCH] feat(bookstack) : add TaskBookStackLink entity and repository --- src/Entity/TaskBookStackLink.php | 113 ++++++++++++++++++ .../TaskBookStackLinkRepository.php | 23 ++++ 2 files changed, 136 insertions(+) create mode 100644 src/Entity/TaskBookStackLink.php create mode 100644 src/Repository/TaskBookStackLinkRepository.php diff --git a/src/Entity/TaskBookStackLink.php b/src/Entity/TaskBookStackLink.php new file mode 100644 index 0000000..5bac0e5 --- /dev/null +++ b/src/Entity/TaskBookStackLink.php @@ -0,0 +1,113 @@ +createdAt = new DateTimeImmutable(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getTask(): Task + { + return $this->task; + } + + public function setTask(Task $task): static + { + $this->task = $task; + + return $this; + } + + public function getBookstackId(): int + { + return $this->bookstackId; + } + + public function setBookstackId(int $bookstackId): static + { + $this->bookstackId = $bookstackId; + + return $this; + } + + public function getBookstackType(): string + { + return $this->bookstackType; + } + + public function setBookstackType(string $bookstackType): static + { + $this->bookstackType = $bookstackType; + + return $this; + } + + public function getTitle(): string + { + return $this->title; + } + + public function setTitle(string $title): static + { + $this->title = $title; + + return $this; + } + + public function getUrl(): string + { + return $this->url; + } + + public function setUrl(string $url): static + { + $this->url = $url; + + return $this; + } + + public function getCreatedAt(): DateTimeImmutable + { + return $this->createdAt; + } +} diff --git a/src/Repository/TaskBookStackLinkRepository.php b/src/Repository/TaskBookStackLinkRepository.php new file mode 100644 index 0000000..8096ccb --- /dev/null +++ b/src/Repository/TaskBookStackLinkRepository.php @@ -0,0 +1,23 @@ +findBy(['task' => $taskId], ['createdAt' => 'DESC']); + } +}