<?php
namespace App\Entity;
use App\Repository\VenteRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VenteRepository::class)]
class Vente
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $TypeClient = null;
#[ORM\Column(length: 30)]
private ?string $TypeVente = null;
#[ORM\Column(length: 30)]
private ?string $Statut = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $CommentaireInterne = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $CommentaireClient = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Email = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Telephone = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $Adresse = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $CodePostal = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Ville = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Societe = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $NomComplet = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $ReferenceChantier = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $DelaiSouhaite = null;
#[ORM\Column]
private ?bool $Imperatif = null;
#[ORM\OneToMany(mappedBy: 'Vente', targetEntity: Piece::class, orphanRemoval: true)]
private Collection $pieces;
public function __construct()
{
$this->pieces = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTypeClient(): ?string
{
return $this->TypeClient;
}
public function setTypeClient(string $TypeClient): self
{
$this->TypeClient = $TypeClient;
return $this;
}
public function getTypeVente(): ?string
{
return $this->TypeVente;
}
public function setTypeVente(string $TypeVente): self
{
$this->TypeVente = $TypeVente;
return $this;
}
public function getStatut(): ?string
{
return $this->Statut;
}
public function setStatut(string $Statut): self
{
$this->Statut = $Statut;
return $this;
}
public function getCommentaireInterne(): ?string
{
return $this->CommentaireInterne;
}
public function setCommentaireInterne(?string $CommentaireInterne): self
{
$this->CommentaireInterne = $CommentaireInterne;
return $this;
}
public function getCommentaireClient(): ?string
{
return $this->CommentaireClient;
}
public function setCommentaireClient(?string $CommentaireClient): self
{
$this->CommentaireClient = $CommentaireClient;
return $this;
}
public function getEmail(): ?string
{
return $this->Email;
}
public function setEmail(?string $Email): self
{
$this->Email = $Email;
return $this;
}
public function getTelephone(): ?string
{
return $this->Telephone;
}
public function setTelephone(?string $Telephone): self
{
$this->Telephone = $Telephone;
return $this;
}
public function getAdresse(): ?string
{
return $this->Adresse;
}
public function setAdresse(?string $Adresse): self
{
$this->Adresse = $Adresse;
return $this;
}
public function getCodePostal(): ?string
{
return $this->CodePostal;
}
public function setCodePostal(?string $CodePostal): self
{
$this->CodePostal = $CodePostal;
return $this;
}
public function getVille(): ?string
{
return $this->Ville;
}
public function setVille(?string $Ville): self
{
$this->Ville = $Ville;
return $this;
}
public function getSociete(): ?string
{
return $this->Societe;
}
public function setSociete(?string $Societe): self
{
$this->Societe = $Societe;
return $this;
}
public function getNomComplet(): ?string
{
return $this->NomComplet;
}
public function setNomComplet(?string $NomComplet): self
{
$this->NomComplet = $NomComplet;
return $this;
}
public function getReferenceChantier(): ?string
{
return $this->ReferenceChantier;
}
public function setReferenceChantier(?string $ReferenceChantier): self
{
$this->ReferenceChantier = $ReferenceChantier;
return $this;
}
public function getDelaiSouhaite(): ?\DateTimeInterface
{
return $this->DelaiSouhaite;
}
public function setDelaiSouhaite(?\DateTimeInterface $DelaiSouhaite): self
{
$this->DelaiSouhaite = $DelaiSouhaite;
return $this;
}
public function isImperatif(): ?bool
{
return $this->Imperatif;
}
public function setImperatif(bool $Imperatif): self
{
$this->Imperatif = $Imperatif;
return $this;
}
/**
* @return Collection<int, Piece>
*/
public function getPieces(): Collection
{
return $this->pieces;
}
public function addPiece(Piece $piece): self
{
if (!$this->pieces->contains($piece)) {
$this->pieces->add($piece);
$piece->setVente($this);
}
return $this;
}
public function removePiece(Piece $piece): self
{
if ($this->pieces->removeElement($piece)) {
// set the owning side to null (unless already changed)
if ($piece->getVente() === $this) {
$piece->setVente(null);
}
}
return $this;
}
}