src/Entity/System/State.php line 15

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