<?php
namespace App\Entity;
use App\Repository\FactureRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: FactureRepository::class)]
class Facture
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 15)]
private ?string $status = null;
#[ORM\Column(nullable: true)]
private ?int $montantTotal = null;
#[ORM\Column(nullable: true)]
private ?int $montantRestant = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\OneToOne(inversedBy: 'facture', cascade: ['persist', 'remove'])]
#[ORM\JoinColumn(nullable: false)]
private ?Payement $payement = null;
public function getId(): ?int
{
return $this->id;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): static
{
$this->status = $status;
return $this;
}
public function getMontantTotal(): ?int
{
return $this->montantTotal;
}
public function setMontantTotal(?int $montantTotal): static
{
$this->montantTotal = $montantTotal;
return $this;
}
public function getMontantRestant(): ?int
{
return $this->montantRestant;
}
public function setMontantRestant(?int $montantRestant): static
{
$this->montantRestant = $montantRestant;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getPayement(): ?Payement
{
return $this->payement;
}
public function setPayement(Payement $payement): static
{
$this->payement = $payement;
return $this;
}
}