src/Entity/System/State.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\System\StateRepository")
  6.  *
  7.  * @ORM\Table(name="ps_state")
  8.  */
  9. class State
  10. {
  11.     public const DEFAULT_STATE_ID 0;
  12.     public const ID_STATE_MADRID 340;
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Id
  17.      *
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      *
  20.      * @ORM\Column(type="integer", name="id_state")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var Country
  25.      *
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Country")
  27.      *
  28.      * @ORM\JoinColumn(name="id_country", referencedColumnName="id_country")
  29.      */
  30.     private $country;
  31.     /**
  32.      * @var Zone
  33.      *
  34.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Zone")
  35.      *
  36.      * @ORM\JoinColumn(name="id_zone", referencedColumnName="id_zone")
  37.      */
  38.     private $zone;
  39.     /**
  40.      * @var string
  41.      *
  42.      * @ORM\Column(type="string")
  43.      */
  44.     private $name;
  45.     /**
  46.      * @var string
  47.      *
  48.      * @ORM\Column(type="string")
  49.      */
  50.     private $isoCode;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(type="string")
  55.      */
  56.     private $postcode;
  57.     /**
  58.      * @var bool
  59.      *
  60.      * @ORM\Column(type="boolean")
  61.      */
  62.     private $taxBehavior;
  63.     /**
  64.      * @var bool
  65.      *
  66.      * @ORM\Column(type="boolean")
  67.      */
  68.     private $active;
  69.     /**
  70.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
  71.      */
  72.     private bool $withoutVat;
  73.     public function __construct()
  74.     {
  75.         $this->taxBehavior false;
  76.         $this->active false;
  77.     }
  78.     /**
  79.      * @return int
  80.      */
  81.     public function getId(): int
  82.     {
  83.         return $this->id;
  84.     }
  85.     /**
  86.      * @param int $id
  87.      *
  88.      * @return State
  89.      */
  90.     public function setId(int $id): State
  91.     {
  92.         $this->id $id;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Country
  97.      */
  98.     public function getCountry(): Country
  99.     {
  100.         return $this->country;
  101.     }
  102.     /**
  103.      * @param Country $country
  104.      *
  105.      * @return State
  106.      */
  107.     public function setCountry(Country $country): State
  108.     {
  109.         $this->country $country;
  110.         return $this;
  111.     }
  112.     /**
  113.      * @return Zone
  114.      */
  115.     public function getZone(): Zone
  116.     {
  117.         return $this->zone;
  118.     }
  119.     /**
  120.      * @param Zone $zone
  121.      *
  122.      * @return State
  123.      */
  124.     public function setZone(Zone $zone): State
  125.     {
  126.         $this->zone $zone;
  127.         return $this;
  128.     }
  129.     /**
  130.      * @return string
  131.      */
  132.     public function getName(): string
  133.     {
  134.         return $this->name;
  135.     }
  136.     /**
  137.      * @param string $name
  138.      *
  139.      * @return State
  140.      */
  141.     public function setName(string $name): State
  142.     {
  143.         $this->name $name;
  144.         return $this;
  145.     }
  146.     /**
  147.      * @return string
  148.      */
  149.     public function getIsoCode(): string
  150.     {
  151.         return $this->isoCode;
  152.     }
  153.     /**
  154.      * @param string $isoCode
  155.      *
  156.      * @return State
  157.      */
  158.     public function setIsoCode(string $isoCode): State
  159.     {
  160.         $this->isoCode $isoCode;
  161.         return $this;
  162.     }
  163.     /**
  164.      * @return string
  165.      */
  166.     public function getPostcode(): string
  167.     {
  168.         return $this->postcode;
  169.     }
  170.     /**
  171.      * @param string $postcode
  172.      *
  173.      * @return State
  174.      */
  175.     public function setPostcode(string $postcode): State
  176.     {
  177.         $this->postcode $postcode;
  178.         return $this;
  179.     }
  180.     /**
  181.      * @return bool
  182.      */
  183.     public function isTaxBehavior(): bool
  184.     {
  185.         return $this->taxBehavior;
  186.     }
  187.     /**
  188.      * @param bool $taxBehavior
  189.      *
  190.      * @return State
  191.      */
  192.     public function setTaxBehavior(bool $taxBehavior): State
  193.     {
  194.         $this->taxBehavior $taxBehavior;
  195.         return $this;
  196.     }
  197.     /**
  198.      * @return bool
  199.      */
  200.     public function isActive(): bool
  201.     {
  202.         return $this->active;
  203.     }
  204.     /**
  205.      * @param bool $active
  206.      *
  207.      * @return State
  208.      */
  209.     public function setActive(bool $active): State
  210.     {
  211.         $this->active $active;
  212.         return $this;
  213.     }
  214.     public function isWithoutVat(): bool
  215.     {
  216.         return $this->withoutVat;
  217.     }
  218.     public function setWithoutVat(bool $withoutVat): State
  219.     {
  220.         $this->withoutVat $withoutVat;
  221.         return $this;
  222.     }
  223. }