<?php
namespace App\Entity\Localisation;
use App\Entity\Transporteurs\ZoneLivraison;
use App\Entity\Utilisateur\Utilisateur;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Zone
*
* @ORM\Table(name="localisation__zones")
* @ORM\Entity(repositoryClass="App\Repository\Localisation\ZoneRepository")
* @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
*/
class Zone
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="zoneLocalisation")
* @ORM\JoinColumn(nullable=true)
*/
private $utilisateur;
/**
* @ORM\Column(name="id_import", type="string",length=255, nullable=true)
*/
private $idImport;
/**
* @ORM\Column(name="europe", type="boolean", nullable=true)
*/
private $europe;
/**
* @ORM\Column(name="date", type="datetime", nullable=true)
*/
private $date;
/**
* @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
*/
private $dateSuppression;
/**
* @ORM\Column(name="dateMaj", type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $dateMaj;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\ZoneLivraison", inversedBy="zoneLocalisation")
* @ORM\JoinColumn(nullable=true)
*/
private $zoneLivraison;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\SecteurGeographique")
* @ORM\JoinColumn(nullable=true)
*/
private $secteurGeographique;
/**
* @ORM\Column(name="code_iso", type="string", length=255, nullable=true)
*/
private $codeIso;
/**
* @ORM\Column(name="titre", type="string", length=255, nullable=true)
* @Assert\NotBlank(message="Libellé obligatoire")
*/
private $titre;
/**
* @ORM\Column(name="coordonnees", type="text", nullable=true)
*/
private $coordonnees;
/**
* @ORM\Column(name="code_postal", type="string", length=255, nullable=true)
*/
private $codePostal;
/**
* @ORM\Column(name="centre_longitude", type="float", nullable=true)
*/
private $centreLongitude;
/**
* @ORM\Column(name="centre_latitude", type="float", nullable=true)
*/
private $centreLatitude;
/**
* @ORM\Column(name="titre_format", type="string", length=255, nullable=true)
*/
private $titreFormat;
/**
* @ORM\Column(name="pays", type="string", length=255, nullable=true)
*/
private $pays;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone", cascade={"persist"})
* @ORM\JoinColumn(name="id_parent",nullable=true)
*/
private $parentId;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone", cascade={"persist"})
* @ORM\JoinColumn(name="id_code_postal_parent",nullable=true)
*/
private $idCodePostalParent;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone", cascade={"persist"})
* @ORM\JoinColumn(name="id_pays",nullable=true)
*/
private $paysId;
/**
* @ORM\Column(name="type_id", type="integer")
*/
private $type;
/**
*@ORM\Column(name="visibilite", type="boolean")
*/
private $visibilite;
/**
* @var string
*
* @ORM\Column(name="compteTVA", type="string", nullable=true)
*/
private $compteTVA;
public function getId(): int
{
return $this->id;
}
public function __construct() {
$this->zones = new ArrayCollection();
$this->visibilite = true ;
}
public function setTitre(?string $titre): Zone
{
$this->titre = $titre;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function addZone(Zone $zones): Zone
{
$this->zones[] = $zones;
return $this;
}
public function removeZone(Zone $zones) {
$this->zones->removeElement($zones);
}
public function getZones(): Collection
{
return $this->zones;
}
public function setCoordonnees(?string $coordonnees): Zone
{
$this->coordonnees = $coordonnees;
return $this;
}
public function getCoordonnees(): ?string
{
return $this->coordonnees;
}
public function setCodePostal(?string $codePostal): Zone
{
$this->codePostal = $codePostal;
return $this;
}
public function getCodePostal(): ?string
{
return $this->codePostal;
}
public function setCentreLongitude(?float $centreLongitude): Zone
{
$this->centreLongitude = $centreLongitude;
return $this;
}
public function getCentreLongitude(): ?float
{
return $this->centreLongitude;
}
public function setCentreLatitude(?float $centreLatitude): Zone
{
$this->centreLatitude = $centreLatitude;
return $this;
}
public function getCentreLatitude(): ?float
{
return $this->centreLatitude;
}
public function setTitreFormat(?string $titreFormat): Zone
{
$this->titreFormat = $titreFormat;
return $this;
}
public function getTitreFormat(): ?string
{
return $this->titreFormat;
}
public function setPays(?string $pays): Zone
{
$this->pays = $pays;
return $this;
}
public function getPays(): ?string
{
return $this->pays;
}
public function setParentId(?Zone $parentId): Zone
{
$this->parentId = $parentId;
return $this;
}
public function getParentId(): ?Zone
{
return $this->parentId;
}
public function setIdCodePostalParent(?Zone $idCodePostalParent): Zone
{
$this->idCodePostalParent = $idCodePostalParent;
return $this;
}
public function getIdCodePostalParent(): ?Zone
{
return $this->idCodePostalParent;
}
public function setZoneLivraison(?ZoneLivraison $zoneLivraison): Zone
{
$this->zoneLivraison = $zoneLivraison;
return $this;
}
public function getZoneLivraison(): ?ZoneLivraison
{
return $this->zoneLivraison;
}
public function setDate(?DateTime $date): Zone
{
$this->date = $date;
return $this;
}
public function getDate(): ?DateTime
{
return $this->date;
}
public function setDateSuppression(?DateTime $dateSuppression): Zone
{
$this->dateSuppression = $dateSuppression;
return $this;
}
public function getDateSuppression(): ?DateTime
{
return $this->dateSuppression;
}
public function setDateMaj(?DateTime $dateMaj): Zone
{
$this->dateMaj = $dateMaj;
return $this;
}
public function getDateMaj(): ?DateTime
{
return $this->dateMaj;
}
public function setUtilisateur(?Utilisateur $utilisateur): Zone
{
$this->utilisateur = $utilisateur;
return $this;
}
public function getUtilisateur(): ?Utilisateur
{
return $this->utilisateur;
}
public function setCodeIso(?string $codeIso): Zone
{
$this->codeIso = $codeIso;
return $this;
}
public function getCodeIso(): ?string
{
return $this->codeIso;
}
public function setEurope(?bool $europe): Zone
{
$this->europe = $europe;
return $this;
}
public function getEurope(): ?bool
{
return $this->europe;
}
public function setIdImport(?string $idImport): Zone
{
$this->idImport = $idImport;
return $this;
}
public function getIdImport(): ?string
{
return $this->idImport;
}
public function setVisibilite(?bool $visibilite): Zone
{
$this->visibilite = $visibilite;
return $this;
}
public function getVisibilite(): ?bool
{
return $this->visibilite;
}
public function setPaysId(?Zone $paysId): Zone
{
$this->paysId = $paysId;
return $this;
}
public function getPaysId(): ?Zone
{
return $this->paysId;
}
public function setSecteurGeographique(?SecteurGeographique $secteurGeographique): Zone
{
$this->secteurGeographique = $secteurGeographique;
return $this;
}
public function getSecteurGeographique(): ?SecteurGeographique
{
return $this->secteurGeographique;
}
public function setCompteTVA(?string $compteTVA): Zone
{
$this->compteTVA = $compteTVA;
return $this;
}
public function getCompteTVA(): ?string
{
return $this->compteTVA;
}
public function isEurope(): ?bool
{
return $this->europe;
}
public function getType(): ?int
{
return $this->type;
}
public function setType(int $type): self
{
$this->type = $type;
return $this;
}
public function isVisibilite(): ?bool
{
return $this->visibilite;
}
}