<?php
namespace App\Entity;
use App\Repository\PaymentdeviRepository;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PaymentdeviRepository::class)]
class Paymentdevi
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $montant = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $acompte = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $reste = null;
#[ORM\ManyToOne(inversedBy: 'paymentdevis')]
private ?Devis $devis = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $piecejointe = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?DateTimeInterface $date = null;
#[ORM\OneToMany(mappedBy: 'paymentdevi', targetEntity: Historiquepaiementsdevis::class, cascade: ["remove"])]
private Collection $historiquepaiementsdevis;
#[ORM\Column(length: 255, nullable: true)]
private ?string $modedepaiement = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $num = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $remise = null;
public function __construct()
{
$this->historiquepaiementsdevis = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getMontant(): ?string
{
return $this->montant;
}
public function setMontant(?string $montant): static
{
$this->montant = $montant;
return $this;
}
public function getAcompte(): ?string
{
return $this->acompte;
}
public function setAcompte(?string $acompte): static
{
$this->acompte = $acompte;
return $this;
}
public function getReste(): ?string
{
return $this->reste;
}
public function setReste(?string $reste): static
{
$this->reste = $reste;
return $this;
}
public function getDevis(): ?Devis
{
return $this->devis;
}
public function setDevis(?Devis $devis): static
{
$this->devis = $devis;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getPiecejointe(): ?string
{
return $this->piecejointe;
}
public function setPiecejointe(?string $piecejointe): static
{
$this->piecejointe = $piecejointe;
return $this;
}
public function getDate(): ?DateTimeInterface
{
return $this->date;
}
public function setDate(?DateTimeInterface $date): static
{
$this->date = $date;
return $this;
}
/**
* @return Collection<int, Historiquepaiementsdevis>
*/
public function getHistoriquepaiementsdevis(): Collection
{
return $this->historiquepaiementsdevis;
}
public function addHistoriquepaiementsdevi(Historiquepaiementsdevis $historiquepaiementsdevi): static
{
if (!$this->historiquepaiementsdevis->contains($historiquepaiementsdevi)) {
$this->historiquepaiementsdevis->add($historiquepaiementsdevi);
$historiquepaiementsdevi->setPaymentdevi($this);
}
return $this;
}
public function removeHistoriquepaiementsdevi(Historiquepaiementsdevis $historiquepaiementsdevi): static
{
if ($this->historiquepaiementsdevis->removeElement($historiquepaiementsdevi)) {
// set the owning side to null (unless already changed)
if ($historiquepaiementsdevi->getPaymentdevi() === $this) {
$historiquepaiementsdevi->setPaymentdevi(null);
}
}
return $this;
}
public function getModedepaiement(): ?string
{
return $this->modedepaiement;
}
public function setModedepaiement(?string $modedepaiement): static
{
$this->modedepaiement = $modedepaiement;
return $this;
}
public function getNum(): ?string
{
return $this->num;
}
public function setNum(?string $num): self
{
$this->num = $num;
return $this;
}
public function getRemise(): ?string
{
return $this->remise;
}
public function setRemise(?string $remise): self
{
$this->remise = $remise;
return $this;
}
}