src/Entity/Localisation/Zone.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Localisation;
  3. use App\Entity\Transporteurs\ZoneLivraison;
  4. use App\Entity\Utilisateur\Utilisateur;
  5. use DateTime;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. /**
  12.  * Zone
  13.  *
  14.  * @ORM\Table(name="localisation__zones")
  15.  * @ORM\Entity(repositoryClass="App\Repository\Localisation\ZoneRepository")
  16.  */
  17. class Zone
  18. {
  19.     /**
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="zoneLocalisation")
  27.      * @ORM\JoinColumn(nullable=true)
  28.      */
  29.     private $utilisateur;
  30.     /**
  31.      * @ORM\Column(name="id_import", type="string",length=255, nullable=true)
  32.      */
  33.     private $idImport;
  34.     /**
  35.      * @ORM\Column(name="europe", type="boolean", nullable=true)
  36.      */
  37.     private $europe;
  38.     /**
  39.      * @ORM\Column(name="date", type="datetime", nullable=true)
  40.      */
  41.     private $date;
  42.     /**
  43.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  44.      */
  45.     private $dateSuppression;
  46.     /**
  47.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  48.      * @Gedmo\Timestampable(on="update")
  49.      */
  50.     private $dateMaj;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="App\Entity\Transporteurs\ZoneLivraison", inversedBy="zoneLocalisation")
  53.      * @ORM\JoinColumn(nullable=true)
  54.      */
  55.     private $zoneLivraison;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\SecteurGeographique")
  58.      * @ORM\JoinColumn(nullable=true)
  59.      */
  60.     private $secteurGeographique;
  61.     /**
  62.      * @ORM\Column(name="code_iso", type="string", length=255, nullable=true)
  63.      */
  64.     private $codeIso;
  65.     /**
  66.      * @ORM\Column(name="titre", type="string", length=255, nullable=true)
  67.      * @Assert\NotBlank(message="LibellĂ© obligatoire")
  68.      */
  69.     private $titre;
  70.     /**
  71.      * @ORM\Column(name="coordonnees", type="text", nullable=true)
  72.      */
  73.     private $coordonnees;
  74.     /**
  75.      * @ORM\Column(name="code_postal", type="string", length=255, nullable=true)
  76.      */
  77.     private $codePostal;
  78.     /**
  79.      * @ORM\Column(name="centre_longitude", type="float", nullable=true)
  80.      */
  81.     private $centreLongitude;
  82.     /**
  83.      * @ORM\Column(name="centre_latitude", type="float", nullable=true)
  84.      */
  85.     private $centreLatitude;
  86.     /**
  87.      * @ORM\Column(name="titre_format", type="string", length=255, nullable=true)
  88.      */
  89.     private $titreFormat;
  90.     /**
  91.      * @ORM\Column(name="pays", type="string", length=255, nullable=true)
  92.      */
  93.     private $pays;
  94.     /**
  95.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone", cascade={"persist"})
  96.      * @ORM\JoinColumn(name="id_parent",nullable=true)
  97.      */
  98.     private $parentId;
  99.     /**
  100.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone", cascade={"persist"})
  101.      * @ORM\JoinColumn(name="id_code_postal_parent",nullable=true)
  102.      */
  103.     private $idCodePostalParent;
  104.     /**
  105.      * @ORM\ManyToOne(targetEntity="App\Entity\Localisation\Zone", cascade={"persist"})
  106.      * @ORM\JoinColumn(name="id_pays",nullable=true)
  107.      */
  108.     private $paysId;
  109.     /**
  110.      * @ORM\Column(name="type_id", type="integer")
  111.      */
  112.     private $type;
  113.     /**
  114.      *@ORM\Column(name="visibilite", type="boolean")
  115.      */
  116.     private $visibilite;
  117.     /**
  118.      * @var string
  119.      *
  120.      * @ORM\Column(name="compteTVA", type="string", nullable=true)
  121.      */
  122.     private $compteTVA;
  123.     public function getId(): int
  124.     {
  125.         return $this->id;
  126.     }
  127.     public function __construct() {
  128.         $this->zones = new ArrayCollection();
  129.         $this->visibilite true ;
  130.     }
  131.     public function setTitre(?string $titre): Zone
  132.     {
  133.         $this->titre $titre;
  134.         return $this;
  135.     }
  136.     public function getTitre(): ?string
  137.     {
  138.         return $this->titre;
  139.     }
  140.     public function addZone(Zone $zones): Zone
  141.     {
  142.         $this->zones[] = $zones;
  143.         return $this;
  144.     }
  145.     public function removeZone(Zone $zones) {
  146.         $this->zones->removeElement($zones);
  147.     }
  148.     public function getZones(): Collection
  149.     {
  150.         return $this->zones;
  151.     }
  152.     public function setCoordonnees(?string $coordonnees): Zone
  153.     {
  154.         $this->coordonnees $coordonnees;
  155.         return $this;
  156.     }
  157.     public function getCoordonnees(): ?string
  158.     {
  159.         return $this->coordonnees;
  160.     }
  161.     public function setCodePostal(?string $codePostal): Zone
  162.     {
  163.         $this->codePostal $codePostal;
  164.         return $this;
  165.     }
  166.     public function getCodePostal(): ?string
  167.     {
  168.         return $this->codePostal;
  169.     }
  170.     public function setCentreLongitude(?float $centreLongitude): Zone
  171.     {
  172.         $this->centreLongitude $centreLongitude;
  173.         return $this;
  174.     }
  175.     public function getCentreLongitude(): ?float
  176.     {
  177.         return $this->centreLongitude;
  178.     }
  179.     public function setCentreLatitude(?float $centreLatitude): Zone
  180.     {
  181.         $this->centreLatitude $centreLatitude;
  182.         return $this;
  183.     }
  184.     public function getCentreLatitude(): ?float
  185.     {
  186.         return $this->centreLatitude;
  187.     }
  188.     public function setTitreFormat(?string $titreFormat): Zone
  189.     {
  190.         $this->titreFormat $titreFormat;
  191.         return $this;
  192.     }
  193.     public function getTitreFormat(): ?string
  194.     {
  195.         return $this->titreFormat;
  196.     }
  197.     public function setPays(?string $pays): Zone
  198.     {
  199.         $this->pays $pays;
  200.         return $this;
  201.     }
  202.     public function getPays(): ?string
  203.     {
  204.         return $this->pays;
  205.     }
  206.     public function setParentId(?Zone $parentId): Zone
  207.     {
  208.         $this->parentId $parentId;
  209.         return $this;
  210.     }
  211.     public function getParentId(): ?Zone
  212.     {
  213.         return $this->parentId;
  214.     }
  215.     public function setIdCodePostalParent(?Zone $idCodePostalParent): Zone
  216.     {
  217.         $this->idCodePostalParent $idCodePostalParent;
  218.         return $this;
  219.     }
  220.     public function getIdCodePostalParent(): ?Zone
  221.     {
  222.         return $this->idCodePostalParent;
  223.     }
  224.     public function setZoneLivraison(?ZoneLivraison $zoneLivraison): Zone
  225.     {
  226.         $this->zoneLivraison $zoneLivraison;
  227.         return $this;
  228.     }
  229.     public function getZoneLivraison(): ?ZoneLivraison
  230.     {
  231.         return $this->zoneLivraison;
  232.     }
  233.     public function setDate(?DateTime $date): Zone
  234.     {
  235.         $this->date $date;
  236.         return $this;
  237.     }
  238.     public function getDate(): ?DateTime
  239.     {
  240.         return $this->date;
  241.     }
  242.     public function setDateSuppression(?DateTime $dateSuppression): Zone
  243.     {
  244.         $this->dateSuppression $dateSuppression;
  245.         return $this;
  246.     }
  247.     public function getDateSuppression(): ?DateTime
  248.     {
  249.         return $this->dateSuppression;
  250.     }
  251.     public function setDateMaj(?DateTime $dateMaj): Zone
  252.     {
  253.         $this->dateMaj $dateMaj;
  254.         return $this;
  255.     }
  256.     public function getDateMaj(): ?DateTime
  257.     {
  258.         return $this->dateMaj;
  259.     }
  260.     public function setUtilisateur(?Utilisateur $utilisateur): Zone
  261.     {
  262.         $this->utilisateur $utilisateur;
  263.         return $this;
  264.     }
  265.     public function getUtilisateur(): ?Utilisateur
  266.     {
  267.         return $this->utilisateur;
  268.     }
  269.     public function setCodeIso(?string $codeIso): Zone
  270.     {
  271.         $this->codeIso $codeIso;
  272.         return $this;
  273.     }
  274.     public function getCodeIso(): ?string
  275.     {
  276.         return $this->codeIso;
  277.     }
  278.     public function setEurope(?bool $europe): Zone
  279.     {
  280.         $this->europe $europe;
  281.         return $this;
  282.     }
  283.     public function getEurope(): ?bool
  284.     {
  285.         return $this->europe;
  286.     }
  287.     public function setIdImport(?string $idImport): Zone
  288.     {
  289.         $this->idImport $idImport;
  290.         return $this;
  291.     }
  292.     public function getIdImport(): ?string
  293.     {
  294.         return $this->idImport;
  295.     }
  296.     public function setVisibilite(?bool $visibilite): Zone
  297.     {
  298.         $this->visibilite $visibilite;
  299.         return $this;
  300.     }
  301.     public function getVisibilite(): ?bool
  302.     {
  303.         return $this->visibilite;
  304.     }
  305.     public function setPaysId(?Zone $paysId): Zone
  306.     {
  307.         $this->paysId $paysId;
  308.         return $this;
  309.     }
  310.     public function getPaysId(): ?Zone
  311.     {
  312.         return $this->paysId;
  313.     }
  314.     public function setSecteurGeographique(?SecteurGeographique $secteurGeographique): Zone
  315.     {
  316.         $this->secteurGeographique $secteurGeographique;
  317.         return $this;
  318.     }
  319.     public function getSecteurGeographique(): ?SecteurGeographique
  320.     {
  321.         return $this->secteurGeographique;
  322.     }
  323.     public function setCompteTVA(?string $compteTVA): Zone
  324.     {
  325.         $this->compteTVA $compteTVA;
  326.         return $this;
  327.     }
  328.     public function getCompteTVA(): ?string
  329.     {
  330.         return $this->compteTVA;
  331.     }
  332.     public function isEurope(): ?bool
  333.     {
  334.         return $this->europe;
  335.     }
  336.     public function getType(): ?int
  337.     {
  338.         return $this->type;
  339.     }
  340.     public function setType(int $type): self
  341.     {
  342.         $this->type $type;
  343.         return $this;
  344.     }
  345.     public function isVisibilite(): ?bool
  346.     {
  347.         return $this->visibilite;
  348.     }
  349. }