<?php
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\System\StateRepository")
*
* @ORM\Table(name="ps_state")
*/
class State
{
public const DEFAULT_STATE_ID = 0;
public const ID_STATE_MADRID = 340;
/**
* @var int
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(type="integer", name="id_state")
*/
private $id;
/**
* @var Country
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Country")
*
* @ORM\JoinColumn(name="id_country", referencedColumnName="id_country")
*/
private $country;
/**
* @var Zone
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Zone")
*
* @ORM\JoinColumn(name="id_zone", referencedColumnName="id_zone")
*/
private $zone;
/**
* @var string
*
* @ORM\Column(type="string")
*/
private $name;
/**
* @var string
*
* @ORM\Column(type="string")
*/
private $isoCode;
/**
* @var string
*
* @ORM\Column(type="string")
*/
private $postcode;
/**
* @var bool
*
* @ORM\Column(type="boolean")
*/
private $taxBehavior;
/**
* @var bool
*
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"default" : 0})
*/
private bool $withoutVat;
public function __construct()
{
$this->taxBehavior = false;
$this->active = false;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*
* @return State
*/
public function setId(int $id): State
{
$this->id = $id;
return $this;
}
/**
* @return Country
*/
public function getCountry(): Country
{
return $this->country;
}
/**
* @param Country $country
*
* @return State
*/
public function setCountry(Country $country): State
{
$this->country = $country;
return $this;
}
/**
* @return Zone
*/
public function getZone(): Zone
{
return $this->zone;
}
/**
* @param Zone $zone
*
* @return State
*/
public function setZone(Zone $zone): State
{
$this->zone = $zone;
return $this;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*
* @return State
*/
public function setName(string $name): State
{
$this->name = $name;
return $this;
}
/**
* @return string
*/
public function getIsoCode(): string
{
return $this->isoCode;
}
/**
* @param string $isoCode
*
* @return State
*/
public function setIsoCode(string $isoCode): State
{
$this->isoCode = $isoCode;
return $this;
}
/**
* @return string
*/
public function getPostcode(): string
{
return $this->postcode;
}
/**
* @param string $postcode
*
* @return State
*/
public function setPostcode(string $postcode): State
{
$this->postcode = $postcode;
return $this;
}
/**
* @return bool
*/
public function isTaxBehavior(): bool
{
return $this->taxBehavior;
}
/**
* @param bool $taxBehavior
*
* @return State
*/
public function setTaxBehavior(bool $taxBehavior): State
{
$this->taxBehavior = $taxBehavior;
return $this;
}
/**
* @return bool
*/
public function isActive(): bool
{
return $this->active;
}
/**
* @param bool $active
*
* @return State
*/
public function setActive(bool $active): State
{
$this->active = $active;
return $this;
}
public function isWithoutVat(): bool
{
return $this->withoutVat;
}
public function setWithoutVat(bool $withoutVat): State
{
$this->withoutVat = $withoutVat;
return $this;
}
}