src/Entity/Localisation/Zone.php line 21

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