<?php
namespace App\Entity;
use App\Repository\EnteteConventionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EnteteConventionRepository::class)
*/
class EnteteConvention
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $numero;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $created_at;
/**
* @ORM\OneToMany(targetEntity=LigneConvention::class, mappedBy="enteteconvention")
*/
private $inscrit;
/**
* @ORM\OneToMany(targetEntity=LigneConvention::class, mappedBy="enteteConvention")
*/
private $ligneConventions;
/**
* @ORM\OneToMany(targetEntity=Inscrit::class, mappedBy="enteteconvention")
*/
private $inscrits;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $typeclient;
/**
* @ORM\ManyToOne(targetEntity=Entreprise::class, inversedBy="enteteConventions")
*/
private $entreprise;
/**
* @ORM\ManyToOne(targetEntity=Organisme::class, inversedBy="enteteConventions")
*/
private $organisme;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $token;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $signature;
public function __construct()
{
$this->inscrit = new ArrayCollection();
$this->ligneConventions = new ArrayCollection();
$this->inscrits = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNumero(): ?string
{
return $this->numero;
}
public function setNumero(?string $numero): self
{
$this->numero = $numero;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(?\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
/**
* @return Collection<int, LigneConvention>
*/
public function getInscrit(): Collection
{
return $this->inscrit;
}
public function addInscrit(LigneConvention $inscrit): self
{
if (!$this->inscrit->contains($inscrit)) {
$this->inscrit[] = $inscrit;
$inscrit->setEnteteconvention($this);
}
return $this;
}
public function removeInscrit(LigneConvention $inscrit): self
{
if ($this->inscrit->removeElement($inscrit)) {
// set the owning side to null (unless already changed)
if ($inscrit->getEnteteconvention() === $this) {
$inscrit->setEnteteconvention(null);
}
}
return $this;
}
/**
* @return Collection<int, LigneConvention>
*/
public function getLigneConventions(): Collection
{
return $this->ligneConventions;
}
public function addLigneConvention(LigneConvention $ligneConvention): self
{
if (!$this->ligneConventions->contains($ligneConvention)) {
$this->ligneConventions[] = $ligneConvention;
$ligneConvention->setEnteteConvention($this);
}
return $this;
}
public function removeLigneConvention(LigneConvention $ligneConvention): self
{
if ($this->ligneConventions->removeElement($ligneConvention)) {
// set the owning side to null (unless already changed)
if ($ligneConvention->getEnteteConvention() === $this) {
$ligneConvention->setEnteteConvention(null);
}
}
return $this;
}
/**
* @return Collection<int, Inscrit>
*/
public function getInscrits(): Collection
{
return $this->inscrits;
}
public function getTypeclient(): ?string
{
return $this->typeclient;
}
public function setTypeclient(?string $typeclient): self
{
$this->typeclient = $typeclient;
return $this;
}
public function getEntreprise(): ?entreprise
{
return $this->entreprise;
}
public function setEntreprise(?entreprise $entreprise): self
{
$this->entreprise = $entreprise;
return $this;
}
public function getOrganisme(): ?Organisme
{
return $this->organisme;
}
public function setOrganisme(?Organisme $organisme): self
{
$this->organisme = $organisme;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(?string $token): self
{
$this->token = $token;
return $this;
}
public function getSignature(): ?string
{
return $this->signature;
}
public function setSignature(?string $signature): self
{
$this->signature = $signature;
return $this;
}
}