<?php
namespace App\Entity;
use App\Repository\EmailInvoiceRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EmailInvoiceRepository::class)
*/
class EmailInvoice
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $token;
/**
* @ORM\ManyToOne(targetEntity=Invoice::class, inversedBy="emailInvoices")
* @ORM\JoinColumn(nullable=false)
*/
private $invoice;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="emailInvoices")
* @ORM\JoinColumn(nullable=false)
*/
private $addedBy;
/**
* @ORM\Column(type="integer")
*/
private $opens = 0;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
public function __construct()
{
$this->createdAt = New \DateTime();
}
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 getInvoice(): ?Invoice
{
return $this->invoice;
}
public function setInvoice(?Invoice $invoice): self
{
$this->invoice = $invoice;
return $this;
}
public function getAddedBy(): ?Users
{
return $this->addedBy;
}
public function setAddedBy(?Users $addedBy): self
{
$this->addedBy = $addedBy;
return $this;
}
public function getOpens(): ?int
{
return $this->opens;
}
public function setOpens(int $opens): self
{
$this->opens = $opens;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $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;
}
}