feat: download ZIP archive of invoices with status 'paid'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user