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']); + } +}