diff --git a/src/Entity/MailFolder.php b/src/Entity/MailFolder.php new file mode 100644 index 0000000..0b2462d --- /dev/null +++ b/src/Entity/MailFolder.php @@ -0,0 +1,115 @@ +id; + } + + public function getPath(): string + { + return $this->path; + } + + public function setPath(string $path): static + { + $this->path = $path; + + return $this; + } + + public function getDisplayName(): string + { + return $this->displayName; + } + + public function setDisplayName(string $displayName): static + { + $this->displayName = $displayName; + + return $this; + } + + public function getParentPath(): ?string + { + return $this->parentPath; + } + + public function setParentPath(?string $parentPath): static + { + $this->parentPath = $parentPath; + + return $this; + } + + public function getUnreadCount(): int + { + return $this->unreadCount; + } + + public function setUnreadCount(int $unreadCount): static + { + $this->unreadCount = $unreadCount; + + return $this; + } + + public function getTotalCount(): int + { + return $this->totalCount; + } + + public function setTotalCount(int $totalCount): static + { + $this->totalCount = $totalCount; + + return $this; + } + + public function getLastSyncedAt(): ?DateTimeImmutable + { + return $this->lastSyncedAt; + } + + public function setLastSyncedAt(?DateTimeImmutable $lastSyncedAt): static + { + $this->lastSyncedAt = $lastSyncedAt; + + return $this; + } +} diff --git a/src/Repository/MailFolderRepository.php b/src/Repository/MailFolderRepository.php new file mode 100644 index 0000000..d228d35 --- /dev/null +++ b/src/Repository/MailFolderRepository.php @@ -0,0 +1,34 @@ + + */ + public function findAllOrderedByPath(): array + { + return $this->createQueryBuilder('f') + ->orderBy('f.path', 'ASC') + ->getQuery() + ->getResult() + ; + } + + public function findByPath(string $path): ?MailFolder + { + return $this->findOneBy(['path' => $path]); + } +}