suivi/src/Entity/Bill.php
2023-04-08 17:47:43 +02:00

149 lines
3 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\BillRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Core\Entity\EntityInterface;
#[ORM\Entity(repositoryClass: BillRepository::class)]
class Bill implements EntityInterface
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $reference = null;
#[ORM\Column(nullable: true)]
private ?float $amountTtc = null;
#[ORM\Column(nullable: true)]
private ?float $amountHt = null;
#[ORM\Column(options: ["default" => 0])]
private ?int $status = 0;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $paymentDeadlineDate = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $file = null;
#[ORM\ManyToOne(inversedBy: 'bills')]
#[ORM\JoinColumn(onDelete: 'SET NULL')]
private ?BillVendor $vendor = null;
public function getId(): ?int
{
return $this->id;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getAmountTtc(): ?float
{
return $this->amountTtc;
}
public function setAmountTtc(?float $amountTtc): self
{
$this->amountTtc = $amountTtc;
return $this;
}
public function getAmountHt(): ?float
{
return $this->amountHt;
}
public function setAmountHt(?float $amountHt): self
{
$this->amountHt = $amountHt;
return $this;
}
public function getStatus(): ?int
{
return $this->status;
}
public function setStatus(int $status): self
{
$this->status = $status;
return $this;
}
public function getHumanStatus(): string
{
return BillPeer::value($this->getStatus());
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getPaymentDeadlineDate(): ?\DateTimeInterface
{
return $this->paymentDeadlineDate;
}
public function setPaymentDeadlineDate(?\DateTimeInterface $paymentDeadlineDate): self
{
$this->paymentDeadlineDate = $paymentDeadlineDate;
return $this;
}
public function getFile(): ?string
{
return $this->file;
}
public function setFile(?string $file): self
{
$this->file = $file;
return $this;
}
public function getVendor(): ?BillVendor
{
return $this->vendor;
}
public function setVendor(?BillVendor $vendor): self
{
$this->vendor = $vendor;
return $this;
}
}