<?php
namespace App\Entity;
use App\Repository\EcheanceInscritRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EcheanceInscritRepository::class)
*/
class EcheanceInscrit
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Financement::class, inversedBy="echeanceInscrits")
* @ORM\JoinColumn(nullable=true)
*/
private $financement;
/**
* @ORM\ManyToOne(targetEntity=Session::class, inversedBy="reglementParticuliers")
*/
private $session;
/**
* @ORM\ManyToOne(targetEntity=Tier::class, inversedBy="reglementParticuliers")
* @ORM\JoinColumn(nullable=false)
*/
private $tier;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $dateecheance;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $montantecheance;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $updated_at;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $montantregle;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $restearegler;
/**
* @ORM\ManyToMany(targetEntity=ReglementEcheance::class, mappedBy="echeanceinscrit", cascade={"persist"})
*/
private $reglementEcheances;
/**
* @ORM\ManyToOne(targetEntity=EnteteFacture::class, inversedBy="echeanceInscrits")
*/
private $enteteFacture;
public function __construct()
{
$this->reglementEcheances = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getSession(): ?Session
{
return $this->session;
}
public function setSession(?Session $session): self
{
$this->session = $session;
return $this;
}
public function getTier(): ?Tier
{
return $this->tier;
}
public function setTier(?Tier $tier): self
{
$this->tier = $tier;
return $this;
}
public function getFinancement(): ?Financement
{
return $this->financement;
}
public function setFinancement(?Financement $financement): self
{
$this->financement = $financement;
return $this;
}
public function getDateecheance(): ?\DateTimeInterface
{
return $this->dateecheance;
}
public function setDateecheance(?\DateTimeInterface $dateecheance): self
{
$this->dateecheance = $dateecheance;
return $this;
}
public function getMontantecheance(): ?float
{
return $this->montantecheance;
}
public function setMontantecheance(?float $montantecheance): self
{
$this->montantecheance = $montantecheance;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(?\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updated_at;
}
public function setUpdatedAt(?\DateTimeImmutable $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
public function getMontantregle(): ?float
{
return $this->montantregle;
}
public function setMontantregle(?float $montantregle): self
{
$this->montantregle = $montantregle;
return $this;
}
public function getRestearegler(): ?float
{
return $this->restearegler;
}
public function setRestearegler(?float $restearegler): self
{
$this->restearegler = $restearegler;
return $this;
}
/**
* @return Collection<int, ReglementEcheance>
*/
public function getReglementEcheances(): Collection
{
return $this->reglementEcheances;
}
public function addReglementEcheance(ReglementEcheance $reglementEcheance): self
{
if (!$this->reglementEcheances->contains($reglementEcheance)) {
$this->reglementEcheances[] = $reglementEcheance;
$reglementEcheance->addEcheanceinscrit($this);
}
return $this;
}
public function removeReglementEcheance(ReglementEcheance $reglementEcheance): self
{
if ($this->reglementEcheances->removeElement($reglementEcheance)) {
$reglementEcheance->removeEcheanceinscrit($this);
}
return $this;
}
public function getEnteteFacture(): ?EnteteFacture
{
return $this->enteteFacture;
}
public function setEnteteFacture(?EnteteFacture $enteteFacture): self
{
$this->enteteFacture = $enteteFacture;
return $this;
}
}