<?php
namespace App\Entity;
use App\Repository\DemandeDevisEnteteRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DemandeDevisEnteteRepository::class)
*/
class DemandeDevisEntete
{
/**
* @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 $client;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $typeClient;
/**
* @ORM\ManyToOne(targetEntity=Organisme::class, inversedBy="demandeDevisEntetes")
*/
private $organisme;
/**
* @ORM\ManyToOne(targetEntity=Entreprise::class, inversedBy="demandeDevisEntetes")
*/
private $entreprise;
/**
* @ORM\ManyToOne(targetEntity=Tier::class, inversedBy="demandeDevisEntetes")
*/
private $tier;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $informationsComplementaires;
/**
* @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="demandeDevisEntetes")
*/
private $site;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $totalHt;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $totalRemise;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $totalApresRemise;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $clientSignature;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $createdAt;
/**
* @ORM\OneToMany(targetEntity=DemandeDevisLigne::class, mappedBy="demandeDevisEntete", cascade={"persist"})
*/
private $demandeDevisLignes;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=1, nullable=true)
*/
private $accepted;
public function __construct()
{
$this->demandeDevisLignes = 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 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 getInformationsComplementaires(): ?string
{
return $this->informationsComplementaires;
}
public function setInformationsComplementaires(?string $informationsComplementaires): self
{
$this->informationsComplementaires = $informationsComplementaires;
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;
}
public function getTotalHt(): ?float
{
return $this->totalHt;
}
public function setTotalHt(?float $totalHt): self
{
$this->totalHt = $totalHt;
return $this;
}
public function getTotalRemise(): ?float
{
return $this->totalRemise;
}
public function setTotalRemise(?float $totalRemise): self
{
$this->totalRemise = $totalRemise;
return $this;
}
public function getTotalApresRemise(): ?float
{
return $this->totalApresRemise;
}
public function setTotalApresRemise(?float $totalApresRemise): self
{
$this->totalApresRemise = $totalApresRemise;
return $this;
}
public function getClientSignature(): ?string
{
return $this->clientSignature;
}
public function setClientSignature(?string $clientSignature): self
{
$this->clientSignature = $clientSignature;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return Collection<int, DemandeDevisLigne>
*/
public function getDemandeDevisLignes(): Collection
{
return $this->demandeDevisLignes;
}
public function addDemandeDevisLigne(DemandeDevisLigne $demandeDevisLigne): self
{
if (!$this->demandeDevisLignes->contains($demandeDevisLigne)) {
$this->demandeDevisLignes[] = $demandeDevisLigne;
$demandeDevisLigne->setDemandeDevisEntete($this);
}
return $this;
}
public function removeDemandeDevisLigne(DemandeDevisLigne $demandeDevisLigne): self
{
if ($this->demandeDevisLignes->removeElement($demandeDevisLigne)) {
// set the owning side to null (unless already changed)
if ($demandeDevisLigne->getDemandeDevisEntete() === $this) {
$demandeDevisLigne->setDemandeDevisEntete(null);
}
}
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getAccepted(): ?string
{
return $this->accepted;
}
public function setAccepted(?string $accepted): self
{
$this->accepted = $accepted;
return $this;
}
}