src/Entity/System/Zone.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Table(name="ps_zone")
  6.  *
  7.  * @ORM\Entity(repositoryClass="App\Repository\System\ZoneRepository")
  8.  */
  9. class Zone
  10. {
  11.     /**
  12.      * @var int
  13.      *
  14.      * @ORM\Id
  15.      *
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      *
  18.      * @ORM\Column(type="integer", name="id_zone")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string
  23.      *
  24.      * @ORM\Column(type="string", length=64)
  25.      */
  26.     private $name;
  27.     /**
  28.      * @var bool
  29.      *
  30.      * @ORM\Column(type="boolean")
  31.      */
  32.     private $active;
  33.     public const ZONE_EU 1;
  34.     public function __construct()
  35.     {
  36.         $this->active false;
  37.     }
  38.     /**
  39.      * @return int
  40.      */
  41.     public function getId(): int
  42.     {
  43.         return $this->id;
  44.     }
  45.     /**
  46.      * @param int $id
  47.      *
  48.      * @return Zone
  49.      */
  50.     public function setId(int $id): Zone
  51.     {
  52.         $this->id $id;
  53.         return $this;
  54.     }
  55.     /**
  56.      * @return string
  57.      */
  58.     public function getName(): string
  59.     {
  60.         return $this->name;
  61.     }
  62.     /**
  63.      * @param string $name
  64.      *
  65.      * @return Zone
  66.      */
  67.     public function setName(string $name): Zone
  68.     {
  69.         $this->name $name;
  70.         return $this;
  71.     }
  72.     /**
  73.      * @return bool
  74.      */
  75.     public function isActive(): bool
  76.     {
  77.         return $this->active;
  78.     }
  79.     /**
  80.      * @param bool $active
  81.      *
  82.      * @return Zone
  83.      */
  84.     public function setActive(bool $active): Zone
  85.     {
  86.         $this->active $active;
  87.         return $this;
  88.     }
  89. }