<?php
namespace App\Entity;
use App\Repository\InvoiceDownloadsRepository;
use Doctrine\ORM\Mapping as ORM;
use DateTimeImmutable;
/**
* @ORM\Entity(repositoryClass=InvoiceDownloadsRepository::class)
*/
class InvoiceDownloads
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $token;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="invoiceDownloads")
*/
private $user;
/**
* @ORM\Column(type="datetime")
*/
private $startDate;
/**
* @ORM\Column(type="datetime")
*/
private $endDate;
/**
* @ORM\Column(type="string", length=255)
*/
private $sentTo;
/**
* @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="invoiceDownloads")
*/
private $establishment;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
public function __construct()
{
$this->createdAt = new DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(string $token): self
{
$this->token = $token;
return $this;
}
public function getUser(): ?Users
{
return $this->user;
}
public function setUser(?Users $user): self
{
$this->user = $user;
return $this;
}
public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
public function setStartDate(\DateTimeInterface $startDate): self
{
$this->startDate = $startDate;
return $this;
}
public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
public function setEndDate(\DateTimeInterface $endDate): self
{
$this->endDate = $endDate;
return $this;
}
public function getSentTo(): ?string
{
return $this->sentTo;
}
public function setSentTo(string $sentTo): self
{
$this->sentTo = $sentTo;
return $this;
}
public function getEstablishment(): ?Establishments
{
return $this->establishment;
}
public function setEstablishment(?Establishments $establishment): self
{
$this->establishment = $establishment;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
}