<?php
namespace App\Entity;
use App\Repository\InvoiceRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InvoiceRepository::class)]
class Invoice
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(nullable: true)]
private ?string $number = null;
#[ORM\Column(nullable: true)]
private ?string $file = null;
#[ORM\Column(nullable: true)]
private ?bool $first = null;
#[ORM\ManyToOne(targetEntity: Contract::class, inversedBy: 'invoices')]
#[ORM\JoinColumn()]
private ?Contract $contract = null;
#[ORM\Column]
private ?\DateTime $dueDate = null;
#[ORM\Column]
private ?\DateTime $createdAt = null;
#[ORM\Column(nullable: true)]
private ?\DateTime $sendAt = null;
#[ORM\Column(nullable: true)]
private ?bool $canceled = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $cancelDescription = null;
#[ORM\Column(nullable: true)]
private ?\DateTime $canceledAt = null;
#[ORM\Column(nullable: true)]
private ?float $total = null;
#[ORM\Column(type: Types::JSON, nullable: true)]
private ?array $data;
#[ORM\Column()]
private int $notified = 0;
public function getId(): ?int
{
return $this->id;
}
public function getNumber(): ?string
{
return $this->number;
}
public function setNumber(?string $number): self
{
$this->number = $number;
return $this;
}
public function getFile(): ?string
{
return $this->file;
}
public function setFile(?string $file): self
{
$this->file = $file;
return $this;
}
public function isFirst(): ?bool
{
return $this->first;
}
public function setFirst(?bool $first): self
{
$this->first = $first;
return $this;
}
public function getDueDate(): ?\DateTimeInterface
{
return $this->dueDate;
}
public function setDueDate(\DateTimeInterface $dueDate): self
{
$this->dueDate = $dueDate;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getSendAt(): ?\DateTimeInterface
{
return $this->sendAt;
}
public function setSendAt(?\DateTimeInterface $sendAt): self
{
$this->sendAt = $sendAt;
return $this;
}
public function isCanceled(): ?bool
{
return $this->canceled;
}
public function setCanceled(?bool $canceled): self
{
$this->canceled = $canceled;
return $this;
}
public function getCancelDescription(): ?string
{
return $this->cancelDescription;
}
public function setCancelDescription(?string $cancelDescription): self
{
$this->cancelDescription = $cancelDescription;
return $this;
}
public function getCanceledAt(): ?\DateTimeInterface
{
return $this->canceledAt;
}
public function setCanceledAt(?\DateTimeInterface $canceledAt): self
{
$this->canceledAt = $canceledAt;
return $this;
}
public function getContract(): ?Contract
{
return $this->contract;
}
public function setContract(?Contract $contract): self
{
$this->contract = $contract;
return $this;
}
public function getTotal(): ?float
{
return $this->total;
}
public function setTotal(?float $total): self
{
$this->total = $total;
return $this;
}
public function getData(): ?array
{
return $this->data;
}
public function setData(?array $data): self
{
$this->data = $data;
return $this;
}
public function getNotified(): ?int
{
return $this->notified;
}
public function setNotified(int $notified): self
{
$this->notified = $notified;
return $this;
}
}