feat: download ZIP archive of invoices with status 'paid'

This commit is contained in:
Björn Fromme
2025-01-31 18:08:52 +01:00
parent d39f75d831
commit 3f839f9082
9 changed files with 274 additions and 3 deletions
+42
View File
@@ -66,6 +66,12 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $comment = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $downloadedAt = null;
#[ORM\Column(nullable: true)]
private ?string $downloadedBy = null;
public function __construct()
{
$this->uuid = Uuid::v4();
@@ -242,4 +248,40 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
return $this;
}
public function getDownloadedAt(): ?\DateTimeImmutable
{
return $this->downloadedAt;
}
public function setDownloadedAt(?\DateTimeImmutable $downloadedAt): static
{
$this->downloadedAt = $downloadedAt;
return $this;
}
public function isDownloaded(): bool
{
return null !== $this->downloadedAt;
}
public function setDownloaded(): static
{
$this->downloadedAt = new \DateTimeImmutable();
return $this;
}
public function getDownloadedBy(): ?string
{
return $this->downloadedBy;
}
public function setDownloadedBy(?string $downloadedBy): static
{
$this->downloadedBy = $downloadedBy;
return $this;
}
}