src/Entity/Chantier.php line 13
<?phpnamespace App\Entity;use App\Repository\ChantierRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use phpDocumentor\Reflection\Types\Nullable;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: ChantierRepository::class)]class Chantier{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 50)]private ?string $nom = null;#[ORM\Column( nullable: true)]private ?int $metrage = null;#[ORM\Column(length: 50 , nullable: true)]#[Assert\Regex(pattern:"/^R+[0-9]{1}$/")]private ?string $raidechausse = null;#[ORM\ManyToOne(inversedBy: 'chantiers')]private ?TypeChantier $type = null;#[ORM\ManyToOne(inversedBy: 'chantiers')]private ?Commercial $commercial = null;#[ORM\OneToMany(mappedBy: 'chantier', targetEntity: Visite::class,cascade: ["persist"])]private Collection $visite;#[ORM\ManyToMany(targetEntity: Intervenant::class, inversedBy: 'chantiers')]private Collection $intervenant;#[ORM\ManyToOne(inversedBy: 'chantiers')]private ?NatureChantier $nature = null;#[ORM\Column(length: 50, nullable: true)]private ?string $planDaction = null;#[ORM\OneToMany(mappedBy: 'chantier', targetEntity: Tache::class)]private Collection $tache;#[ORM\Column(nullable: true)]private ?int $nombreVisite = null;#[ORM\ManyToMany(targetEntity: Directeur::class, inversedBy: 'chantiers')]private Collection $directeur;#[ORM\ManyToOne(inversedBy: 'chantiers')]private ?Zone $zone = null;#[ORM\Column(length: 255, nullable: true)]private ?string $latitude = null;#[ORM\Column(length: 255, nullable: true)]private ?string $longitude = null;#[ORM\Column(length: 50,nullable: true)]private ?string $revendeur = null;#[ORM\Column(length: 50, nullable: true)]private ?string $architect = null;#[ORM\Column(length: 50, nullable: true)]private ?string $pi = null;#[ORM\OneToMany(mappedBy: 'chantier', targetEntity: ProductMetrage::class)]private Collection $productMetrages;#[ORM\OneToMany(mappedBy: 'chantier', targetEntity: ChantierProduit::class)]private Collection $chantierProduits;#[ORM\Column(length: 255, nullable: true)]private ?string $demande = null;#[ORM\ManyToOne(inversedBy: 'direction')]private ?Directeur $direction = null;#[ORM\Column(type: 'datetime', nullable: true)]private ?\DateTimeInterface $dateModification = null;#[ORM\Column(length: 255, nullable: true)]private ?string $egc = null;#[ORM\Column(length: 255, nullable: true)]private ?string $valeur = null;#[ORM\Column(length: 255, nullable: true)]private ?string $budgetrev = null;#[ORM\Column(length: 255, nullable: true)]private ?string $typerev = null;#[ORM\OneToMany(mappedBy: 'chantier', targetEntity: ChantierProduct::class)]private Collection $chantierProducts;#[ORM\Column(length: 255, nullable: true)]private ?string $products = null;#[ORM\Column(length: 255, nullable: true)]private ?string $concurrent = null;#[ORM\Column(length: 255, nullable: true)]private ?string $mcarre = null;#[ORM\Column(length: 255, nullable: true)]private ?string $vglobal = null;#[ORM\Column(length: 255, nullable: true)]private ?string $financement = null;#[ORM\Column(length: 255, nullable: true)]private ?string $datedebut = null;#[ORM\ManyToOne(inversedBy: 'chantiers')]private ?Revendeur $client = null;#[ORM\Column(length: 255, nullable: true)]private ?string $otherclient = null;#[ORM\ManyToOne]private ?Departement $departement = null;#[ORM\Column(length: 255, nullable: true)]private ?string $choix = null;public function __construct(){$this->visite = new ArrayCollection();$this->intervenant = new ArrayCollection();$this->tache = new ArrayCollection();$this->directeur = new ArrayCollection();$this->productMetrages = new ArrayCollection();$this->chantierProduits = new ArrayCollection();$this->chantierProducts = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getNom(): ?string{return $this->nom;}public function setNom(string $nom): self{$this->nom = $nom;return $this;}public function getMetrage(): ?int{return $this->metrage;}public function setMetrage(int $metrage): self{$this->metrage = $metrage;return $this;}public function getRaidechausse(): ?string{return $this->raidechausse;}public function setRaidechausse(string $raidechausse): self{$this->raidechausse = $raidechausse;return $this;}public function getType(): ?TypeChantier{return $this->type;}public function setType(?TypeChantier $type): self{$this->type = $type;return $this;}public function getCommercial(): ?Commercial{return $this->commercial;}public function setCommercial(?Commercial $commercial): self{$this->commercial = $commercial;return $this;}/*** @return Collection<int, Visite>*/public function getVisite(): Collection{return $this->visite;}public function addVisite(Visite $visite): self{if (!$this->visite->contains($visite)) {$this->visite->add($visite);$visite->setChantier($this);}return $this;}public function removeVisite(Visite $visite): self{if ($this->visite->removeElement($visite)) {// set the owning side to null (unless already changed)if ($visite->getChantier() === $this) {$visite->setChantier(null);}}return $this;}/*** @return Collection<int, Intervenant>*/public function getIntervenant(): Collection{return $this->intervenant;}public function addIntervenant(?Intervenant $intervenant): self{if ($intervenant !== null) {if (!$this->intervenant->contains($intervenant)) {$this->intervenant->add($intervenant);$intervenant->addChantier($this);}}return $this;}public function removeIntervenant(Intervenant $intervenant): self{$this->intervenant->removeElement($intervenant);return $this;}public function getNature(): ?NatureChantier{return $this->nature;}public function setNature(?NatureChantier $nature): self{$this->nature = $nature;return $this;}public function getPlanDaction(): ?string{return $this->planDaction;}public function setPlanDaction(?string $planDaction): self{$this->planDaction = $planDaction;return $this;}/*** @return Collection<int, Tache>*/public function getTache(): Collection{return $this->tache;}public function addTache(Tache $tache): self{if (!$this->tache->contains($tache)) {$this->tache->add($tache);$tache->setChantier($this);}return $this;}public function removeTache(Tache $tache): self{if ($this->tache->removeElement($tache)) {// set the owning side to null (unless already changed)if ($tache->getChantier() === $this) {$tache->setChantier(null);}}return $this;}public function getNombreVisite(): ?int{return $this->nombreVisite;}public function setNombreVisite(?int $nombreVisite): self{$this->nombreVisite = $nombreVisite;return $this;}/*** @return Collection<int, Directeur>*/public function getDirecteur(): Collection{return $this->directeur;}public function addDirecteur(Directeur $directeur): self{if (!$this->directeur->contains($directeur)) {$this->directeur->add($directeur);}return $this;}public function removeDirecteur(Directeur $directeur): self{$this->directeur->removeElement($directeur);return $this;}public function getZone(): ?Zone{return $this->zone;}public function setZone(?Zone $zone): self{$this->zone = $zone;return $this;}public function getLatitude(): ?string{return $this->latitude;}public function setLatitude(?string $latitude): self{$this->latitude = $latitude;return $this;}public function getLongitude(): ?string{return $this->longitude;}public function setLongitude(?string $longitude): self{$this->longitude = $longitude;return $this;}public function getRevendeur(): ?string{return $this->revendeur;}public function setRevendeur(string $revendeur): self{$this->revendeur = $revendeur;return $this;}public function getArchitect(): ?string{return $this->architect;}public function setArchitect(?string $architect): self{$this->architect = $architect;return $this;}public function getPi(): ?string{return $this->pi;}public function setPi(?string $pi): self{$this->pi = $pi;return $this;}/*** @return Collection<int, ProductMetrage>*/public function getProductMetrages(): Collection{return $this->productMetrages;}public function addProductMetrage(ProductMetrage $productMetrage): self{if (!$this->productMetrages->contains($productMetrage)) {$this->productMetrages->add($productMetrage);$productMetrage->setChantier($this);}return $this;}public function removeProductMetrage(ProductMetrage $productMetrage): self{if ($this->productMetrages->removeElement($productMetrage)) {// set the owning side to null (unless already changed)if ($productMetrage->getChantier() === $this) {$productMetrage->setChantier(null);}}return $this;}/*** @return Collection<int, ChantierProduit>*/public function getChantierProduits(): Collection{return $this->chantierProduits;}public function addChantierProduit(ChantierProduit $chantierProduit): self{if (!$this->chantierProduits->contains($chantierProduit)) {$this->chantierProduits->add($chantierProduit);$chantierProduit->setChantier($this);}return $this;}public function removeChantierProduit(ChantierProduit $chantierProduit): self{if ($this->chantierProduits->removeElement($chantierProduit)) {// set the owning side to null (unless already changed)if ($chantierProduit->getChantier() === $this) {$chantierProduit->setChantier(null);}}return $this;}public function getDemande(): ?string{return $this->demande;}public function setDemande(?string $demande): self{$this->demande = $demande;return $this;}public function getDirection(): ?Directeur{return $this->direction;}public function setDirection(?Directeur $direction): self{$this->direction = $direction;return $this;}public function getDateModification(): ?\DateTimeInterface{return $this->dateModification;}public function setDateModification(?\DateTimeInterface $dateModification): self{$this->dateModification = $dateModification;return $this;}public function getEgc(): ?string{return $this->egc;}public function setEgc(string $egc): self{$this->egc = $egc;return $this;}public function getValeur(): ?string{return $this->valeur;}public function setValeur(string $valeur): self{$this->valeur = $valeur;return $this;}public function getBudgetrev(): ?string{return $this->budgetrev;}public function setBudgetrev(string $budgetrev): self{$this->budgetrev = $budgetrev;return $this;}public function getTyperev(): ?string{return $this->typerev;}public function setTyperev(string $typerev): self{$this->typerev = $typerev;return $this;}/*** @return Collection<int, ChantierProduct>*/public function getChantierProducts(): Collection{return $this->chantierProducts;}public function addChantierProduct(ChantierProduct $chantierProduct): self{if (!$this->chantierProducts->contains($chantierProduct)) {$this->chantierProducts->add($chantierProduct);$chantierProduct->setChantier($this);}return $this;}public function removeChantierProduct(ChantierProduct $chantierProduct): self{if ($this->chantierProducts->removeElement($chantierProduct)) {// set the owning side to null (unless already changed)if ($chantierProduct->getChantier() === $this) {$chantierProduct->setChantier(null);}}return $this;}public function getProducts(): ?string{return $this->products;}public function setProducts(string $products): self{$this->products = $products;return $this;}public function getConcurrent(): ?string{return $this->concurrent;}public function setConcurrent(string $concurrent): self{$this->concurrent = $concurrent;return $this;}public function getMcarre(): ?string{return $this->mcarre;}public function setMcarre(?string $mcarre): self{$this->mcarre = $mcarre;return $this;}public function getVglobal(): ?string{return $this->vglobal;}public function setVglobal(?string $vglobal): self{$this->vglobal = $vglobal;return $this;}public function getFinancement(): ?string{return $this->financement;}public function setFinancement(?string $financement): self{$this->financement = $financement;return $this;}public function getDatedebut(): ?string{return $this->datedebut;}public function setDatedebut(?string $datedebut): self{$this->datedebut = $datedebut;return $this;}public function getClient(): ?revendeur{return $this->client;}public function setClient(?revendeur $client): self{$this->client = $client;return $this;}public function getOtherclient(): ?string{return $this->otherclient;}public function setOtherclient(?string $otherclient): self{$this->otherclient = $otherclient;return $this;}public function getDepartement(): ?Departement{return $this->departement;}public function setDepartement(?Departement $departement): self{$this->departement = $departement;return $this;}public function getChoix(): ?string{return $this->choix;}public function setChoix(string $choix): self{$this->choix = $choix;return $this;}}