src/Entity/State.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * State
  6.  * @ORM\Table(name="state", indexes={@ORM\Index(name="st_country_id", columns={"st_country_id"})})
  7.  * @ORM\Entity(repositoryClass="App\Repository\StateRepository")
  8.  */
  9. class State {
  10.     const USA 1;
  11.     /**
  12.      * @var integer
  13.      * @ORM\Column(name="st_id", type="integer")
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue(strategy="IDENTITY")
  16.      */
  17.     private $stId;
  18.     /**
  19.      * @var string
  20.      * @ORM\Column(name="st_name", type="string", length=50, nullable=false, options={"comment"="nombre del estado"})
  21.      */
  22.     private $stName;
  23.     /**
  24.      * @var string
  25.      * @ORM\Column(name="st_full_name", type="string", length=50, nullable=true, options={"comment"="nombre completo del estado"})
  26.      */
  27.     private $stFullName;
  28.     /**
  29.      * @var \App\Entity\Country
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\Country")
  31.      * @ORM\JoinColumns({
  32.      *   @ORM\JoinColumn(name="st_country_id", referencedColumnName="co_id", options={"comment"="llave foránea desde country, relación de uno a muchos"})
  33.      * })
  34.      */
  35.     private $stCountry;
  36.     /**
  37.      * @var string
  38.      * @ORM\Column(name="st_dian_code_lc", type="string", length=3, nullable=true, options={"comment"="código proporcionado por la DIAN, el cual identifica a los departamentos de Colombia, solo se utilizara para level Colombia"})
  39.      */
  40.     private $stDianCodeLc;
  41.     /**
  42.      * @var string
  43.      * @ORM\Column(name="st_call_sign_lc", type="string", length=7, nullable=true, options={"comment"="Indicativo para realizar llamadas a ciudades del departamento solo aplica para Colombia, solo se utilizara para level Colombia"})
  44.      */
  45.     private $stCallSignLc;
  46.     /**
  47.      * @return type
  48.      */
  49.     public function getStId() {
  50.         return $this->stId;
  51.     }
  52.     /**
  53.      * @return string
  54.      */
  55.     public function getStName() {
  56.         return $this->stName;
  57.     }
  58.     /**
  59.      * @return  string
  60.      */ 
  61.     public function getStFullName() {
  62.         return $this->stFullName;
  63.     }
  64.     /**
  65.      * @return type
  66.      */
  67.     public function getStCountry() {
  68.         return $this->stCountry;
  69.     }
  70.     /**
  71.      * @param type $stId
  72.      */
  73.     public function setStId($stId) {
  74.         $this->stId $stId;
  75.     }
  76.     /**
  77.      * @param type $stName
  78.      */
  79.     public function setStName($stName) {
  80.         $this->stName $stName;
  81.     }
  82.     /**
  83.      * @param  string  $stFullName
  84.      */ 
  85.     public function setStFullName($stFullName) {
  86.         $this->stFullName $stFullName;
  87.     }
  88.     /**
  89.      * @param \App\Entity\Country $stCountry
  90.      */
  91.     public function setStCountry(\App\Entity\Country $stCountry) {
  92.         $this->stCountry $stCountry;
  93.     }
  94.     /**
  95.      * @param type $stDianCodeLc
  96.      */
  97.     public function setStDianCodeLc($stDianCodeLc) {
  98.         $this->stDianCodeLc $stDianCodeLc;
  99.     }
  100.     /**
  101.      * @return type
  102.      */
  103.     public function getStDianCodeLc() {
  104.         return $this->stDianCodeLc;
  105.     }
  106.     
  107.     /**
  108.      * @return type
  109.      */
  110.     public function getStCallSignLc() {
  111.         return $this->stCallSignLc;
  112.     }
  113.     /**
  114.      * @param type $stCallSignLc
  115.      */
  116.     public function setStCallSignLc($stCallSignLc) {
  117.         $this->stCallSignLc $stCallSignLc;
  118.     }
  119.     /**
  120.      * @return type
  121.      */
  122.     public function __toString() {
  123.         return $this->stName;
  124.     }
  125.     /**
  126.      * Función para pasar a de tipo objeto-entidad a json
  127.      */
  128.     public function showEverything() {
  129.         return get_object_vars($this);
  130.     }
  131. }