<?php
namespace App\Entity;
use App\Repository\EnteteDevisRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EnteteDevisRepository::class)
*/
class EnteteDevis
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $numerodevis;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $datedevis;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $datefinvalidite;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $created_at;
/**
* @ORM\OneToMany(targetEntity=LigneDevis::class, mappedBy="entetedevis", cascade={"persist"})
*/
private $ligneDevis;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $client;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $typeclient;
/**
* @ORM\ManyToOne(targetEntity=Organisme::class)
*/
private $organisme;
/**
* @ORM\ManyToOne(targetEntity=Entreprise::class)
*/
private $entreprise;
/**
* @ORM\ManyToOne(targetEntity=Tier::class)
*/
private $tier;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $informationcomplementaire;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $statutdevis;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $token;
/**
* @ORM\ManyToOne(targetEntity=Site::class, inversedBy="enteteDevis")
*/
private $site;
public function __construct()
{
$this->ligneDevis = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNumerodevis(): ?string
{
return $this->numerodevis;
}
public function setNumerodevis(?string $numerodevis): self
{
$this->numerodevis = $numerodevis;
return $this;
}
public function getDatedevis(): ?\DateTimeInterface
{
return $this->datedevis;
}
public function setDatedevis(?\DateTimeInterface $datedevis): self
{
$this->datedevis = $datedevis;
return $this;
}
public function getDatefinvalidite(): ?\DateTimeInterface
{
return $this->datefinvalidite;
}
public function setDatefinvalidite(?\DateTimeInterface $datefinvalidite): self
{
$this->datefinvalidite = $datefinvalidite;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
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, LigneDevis>
*/
public function getLigneDevis(): Collection
{
return $this->ligneDevis;
}
public function addLigneDevi(LigneDevis $ligneDevi): self
{
if (!$this->ligneDevis->contains($ligneDevi)) {
$this->ligneDevis[] = $ligneDevi;
$ligneDevi->setEntetedevis($this);
}
return $this;
}
public function removeLigneDevi(LigneDevis $ligneDevi): self
{
if ($this->ligneDevis->removeElement($ligneDevi)) {
// set the owning side to null (unless already changed)
if ($ligneDevi->getEntetedevis() === $this) {
$ligneDevi->setEntetedevis(null);
}
}
return $this;
}
public function getClient(): ?string
{
return $this->client;
}
public function setClient(?string $client): self
{
$this->client = $client;
return $this;
}
public function getTypeclient(): ?string
{
return $this->typeclient;
}
public function setTypeclient(?string $typeclient): self
{
$this->typeclient = $typeclient;
return $this;
}
public function getOrganisme(): ?Organisme
{
return $this->organisme;
}
public function setOrganisme(?Organisme $organisme): self
{
$this->organisme = $organisme;
return $this;
}
public function getEntreprise(): ?Entreprise
{
return $this->entreprise;
}
public function setEntreprise(?Entreprise $entreprise): self
{
$this->entreprise = $entreprise;
return $this;
}
public function getTier(): ?Tier
{
return $this->tier;
}
public function setTier(?Tier $tier): self
{
$this->tier = $tier;
return $this;
}
public function getInformationcomplementaire(): ?string
{
return $this->informationcomplementaire;
}
public function setInformationcomplementaire(?string $informationcomplementaire): self
{
$this->informationcomplementaire = $informationcomplementaire;
return $this;
}
public function getStatutdevis(): ?string
{
return $this->statutdevis;
}
public function setStatutdevis(?string $statutdevis): self
{
$this->statutdevis = $statutdevis;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(?string $token): self
{
$this->token = $token;
return $this;
}
public function getSite(): ?Site
{
return $this->site;
}
public function setSite(?Site $site): self
{
$this->site = $site;
return $this;
}
}