Commit a905bf36b8c6c152c7c559eeec55b1610d9ec4e2
1 parent
898a57433c
Exists in
master
creada la entidad de los objetivos estrategicos amarrado con los nacionales
Showing
3 changed files
with
149 additions
and
42 deletions
Show diff stats
src/AppBundle/Entity/PlanHistoricoNacional.php~
| @@ -0,0 +1,53 @@ | @@ -0,0 +1,53 @@ | ||
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace AppBundle\Entity; | ||
| 4 | + | ||
| 5 | +use Doctrine\ORM\Mapping as ORM; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * PlanHistoricoNacional | ||
| 9 | + * | ||
| 10 | + * @ORM\Table(name="plan_historico_nacional", uniqueConstraints={@ORM\UniqueConstraint(name="uq_municipio", columns={"numero"})}, indexes={@ORM\Index(name="fki_historico_nacional", columns={"id_plan_objetivo_historico"})}) | ||
| 11 | + * @ORM\Entity | ||
| 12 | + */ | ||
| 13 | +class PlanHistoricoNacional | ||
| 14 | +{ | ||
| 15 | + /** | ||
| 16 | + * @var string | ||
| 17 | + * | ||
| 18 | + * @ORM\Column(name="nombre", type="string", length=100, nullable=false, options={"comment" = "Nombre del plan_historico_nacional"}) | ||
| 19 | + */ | ||
| 20 | + private $nombre; | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * @var integer | ||
| 24 | + * | ||
| 25 | + * @ORM\Column(name="numero", type="integer", nullable=false, options={"comment" = "Codigo del muncipio (union de todas las parroquias que lo componen)"}) | ||
| 26 | + */ | ||
| 27 | + private $numero; | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * @var integer | ||
| 32 | + * | ||
| 33 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del plan_historico_nacional"}) | ||
| 34 | + * @ORM\Id | ||
| 35 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
| 36 | + * @ORM\SequenceGenerator(sequenceName="municipio_id_seq", allocationSize=1, initialValue=1) | ||
| 37 | + */ | ||
| 38 | + private $id; | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * @var \AppBundle\Entity\PlanObjetivoHistorico | ||
| 42 | + * | ||
| 43 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\PlanObjetivoHistorico") | ||
| 44 | + * @ORM\JoinColumns({ | ||
| 45 | + * @ORM\JoinColumn(name="id_plan_objetivo_historico", referencedColumnName="id", nullable=false) | ||
| 46 | + * }) | ||
| 47 | + */ | ||
| 48 | + private $idPlanObjetivoHistorico; | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + | ||
| 53 | +} | ||
| 0 | \ No newline at end of file | 54 | \ No newline at end of file |
src/AppBundle/Entity/PlanHistoricoNacionalEstrategico.php
| 1 | <?php | 1 | <?php |
| 2 | -/** | ||
| 3 | - * Created by PhpStorm. | ||
| 4 | - * User: ubv-cipee | ||
| 5 | - * Date: 29/06/16 | ||
| 6 | - * Time: 08:44 AM | ||
| 7 | - */ | ||
| 8 | - | ||
| 9 | 2 | ||
| 10 | namespace AppBundle\Entity; | 3 | namespace AppBundle\Entity; |
| 11 | 4 | ||
| 12 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
| 13 | 6 | ||
| 14 | /** | 7 | /** |
| 15 | - * Parroquia | 8 | + * PlanHistoricoNacionalEstrategico |
| 16 | * | 9 | * |
| 17 | - * @ORM\Table(name="parroquia", uniqueConstraints={@ORM\UniqueConstraint(name="uq_parroquia", columns={"codigo"})}, indexes={@ORM\Index(name="fki_id_municipio_parroquia", columns={"id_municipio"})}) | 10 | + * @ORM\Table(name="plan_historico_nacional_estrategico", uniqueConstraints={@ORM\UniqueConstraint(name="uq_estrategico", columns={"numero"})}, indexes={@ORM\Index(name="fki_id_nacional_estrategico", columns={"id_plan_historico_nacional"})}) |
| 18 | * @ORM\Entity | 11 | * @ORM\Entity |
| 19 | */ | 12 | */ |
| 20 | -class Parroquia | 13 | +class PlanHistoricoNacionalEstrategico |
| 21 | { | 14 | { |
| 22 | /** | 15 | /** |
| 23 | * @var string | 16 | * @var string |
| 24 | * | 17 | * |
| 25 | - * @ORM\Column(name="nombre", type="string", length=40, nullable=false, options={"comment" = "nombre de parroquia"}) | 18 | + * @ORM\Column(name="nombre", type="string", length=40, nullable=false, options={"comment" = "nombre de plan_historico_nacional_estrategico"}) |
| 26 | */ | 19 | */ |
| 27 | private $nombre; | 20 | private $nombre; |
| 28 | 21 | ||
| 29 | /** | 22 | /** |
| 30 | - * @var string | 23 | + * @var integer |
| 31 | * | 24 | * |
| 32 | - * @ORM\Column(name="codigo", type="decimal", precision=6, scale=0, nullable=false, options={"comment" = "codigo parroquia"}) | 25 | + * @ORM\Column(name="numero", type="integer", nullable=false, options={"comment" = "codigo plan_historico_nacional_estrategico"}) |
| 33 | */ | 26 | */ |
| 34 | - private $codigo; | 27 | + private $numero; |
| 35 | 28 | ||
| 36 | /** | 29 | /** |
| 37 | * @var integer | 30 | * @var integer |
| 38 | * | 31 | * |
| 39 | - * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "identificador de la parroquia"}) | 32 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "identificador de la plan_historico_nacional_estrategico"}) |
| 40 | * @ORM\Id | 33 | * @ORM\Id |
| 41 | * @ORM\GeneratedValue(strategy="IDENTITY") | 34 | * @ORM\GeneratedValue(strategy="IDENTITY") |
| 42 | * @ORM\SequenceGenerator(sequenceName="parroquia_id_seq", allocationSize=1, initialValue=1) | 35 | * @ORM\SequenceGenerator(sequenceName="parroquia_id_seq", allocationSize=1, initialValue=1) |
| @@ -44,22 +37,21 @@ class Parroquia | @@ -44,22 +37,21 @@ class Parroquia | ||
| 44 | private $id; | 37 | private $id; |
| 45 | 38 | ||
| 46 | /** | 39 | /** |
| 47 | - * @var \AppBundle\Entity\Municipio | 40 | + * @var \AppBundle\Entity\PlanHistoricoNacional |
| 48 | * | 41 | * |
| 49 | - * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Municipio") | 42 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\PlanHistoricoNacional") |
| 50 | * @ORM\JoinColumns({ | 43 | * @ORM\JoinColumns({ |
| 51 | - * @ORM\JoinColumn(name="id_municipio", referencedColumnName="id", nullable=false) | 44 | + * @ORM\JoinColumn(name="id_plan_historico_nacional", referencedColumnName="id", nullable=false) |
| 52 | * }) | 45 | * }) |
| 53 | */ | 46 | */ |
| 54 | - private $idMunicipio; | ||
| 55 | - | ||
| 56 | - | 47 | + private $idPlanHistoricoNacional; |
| 48 | + | ||
| 57 | 49 | ||
| 58 | /** | 50 | /** |
| 59 | * Set nombre | 51 | * Set nombre |
| 60 | * | 52 | * |
| 61 | * @param string $nombre | 53 | * @param string $nombre |
| 62 | - * @return Parroquia | 54 | + * @return PlanHistoricoNacionalEstrategico |
| 63 | */ | 55 | */ |
| 64 | public function setNombre($nombre) | 56 | public function setNombre($nombre) |
| 65 | { | 57 | { |
| @@ -71,7 +63,7 @@ class Parroquia | @@ -71,7 +63,7 @@ class Parroquia | ||
| 71 | /** | 63 | /** |
| 72 | * Get nombre | 64 | * Get nombre |
| 73 | * | 65 | * |
| 74 | - * @return string | 66 | + * @return string |
| 75 | */ | 67 | */ |
| 76 | public function getNombre() | 68 | public function getNombre() |
| 77 | { | 69 | { |
| @@ -79,32 +71,32 @@ class Parroquia | @@ -79,32 +71,32 @@ class Parroquia | ||
| 79 | } | 71 | } |
| 80 | 72 | ||
| 81 | /** | 73 | /** |
| 82 | - * Set codigo | 74 | + * Set numero |
| 83 | * | 75 | * |
| 84 | - * @param string $codigo | ||
| 85 | - * @return Parroquia | 76 | + * @param integer $numero |
| 77 | + * @return PlanHistoricoNacionalEstrategico | ||
| 86 | */ | 78 | */ |
| 87 | - public function setCodigo($codigo) | 79 | + public function setNumero($numero) |
| 88 | { | 80 | { |
| 89 | - $this->codigo = $codigo; | 81 | + $this->numero = $numero; |
| 90 | 82 | ||
| 91 | return $this; | 83 | return $this; |
| 92 | } | 84 | } |
| 93 | 85 | ||
| 94 | /** | 86 | /** |
| 95 | - * Get codigo | 87 | + * Get numero |
| 96 | * | 88 | * |
| 97 | - * @return string | 89 | + * @return integer |
| 98 | */ | 90 | */ |
| 99 | - public function getCodigo() | 91 | + public function getNumero() |
| 100 | { | 92 | { |
| 101 | - return $this->codigo; | 93 | + return $this->numero; |
| 102 | } | 94 | } |
| 103 | 95 | ||
| 104 | /** | 96 | /** |
| 105 | * Get id | 97 | * Get id |
| 106 | * | 98 | * |
| 107 | - * @return integer | 99 | + * @return integer |
| 108 | */ | 100 | */ |
| 109 | public function getId() | 101 | public function getId() |
| 110 | { | 102 | { |
| @@ -112,25 +104,35 @@ class Parroquia | @@ -112,25 +104,35 @@ class Parroquia | ||
| 112 | } | 104 | } |
| 113 | 105 | ||
| 114 | /** | 106 | /** |
| 115 | - * Set idMunicipio | 107 | + * Set idPlanHistoricoNacional |
| 116 | * | 108 | * |
| 117 | - * @param \AppBundle\Entity\Municipio $idMunicipio | ||
| 118 | - * @return Parroquia | 109 | + * @param \AppBundle\Entity\PlanHistoricoNacional $idPlanHistoricoNacional |
| 110 | + * @return PlanHistoricoNacionalEstrategico | ||
| 119 | */ | 111 | */ |
| 120 | - public function setIdMunicipio(\AppBundle\Entity\Municipio $idMunicipio = null) | 112 | + public function setIdPlanHistoricoNacional(\AppBundle\Entity\PlanHistoricoNacional $idPlanHistoricoNacional) |
| 121 | { | 113 | { |
| 122 | - $this->idMunicipio = $idMunicipio; | 114 | + $this->idPlanHistoricoNacional = $idPlanHistoricoNacional; |
| 123 | 115 | ||
| 124 | return $this; | 116 | return $this; |
| 125 | } | 117 | } |
| 126 | 118 | ||
| 127 | /** | 119 | /** |
| 128 | - * Get idMunicipio | 120 | + * Get idPlanHistoricoNacional |
| 129 | * | 121 | * |
| 130 | - * @return \AppBundle\Entity\Municipio | 122 | + * @return \AppBundle\Entity\PlanHistoricoNacional |
| 131 | */ | 123 | */ |
| 132 | - public function getIdMunicipio() | 124 | + public function getIdPlanHistoricoNacional() |
| 133 | { | 125 | { |
| 134 | - return $this->idMunicipio; | 126 | + return $this->idPlanHistoricoNacional; |
| 127 | + } | ||
| 128 | + | ||
| 129 | + | ||
| 130 | + /** | ||
| 131 | + * Get nombre | ||
| 132 | + * | ||
| 133 | + * @return string | ||
| 134 | + */ | ||
| 135 | + public function __toString() { | ||
| 136 | + return $this->getNombre(); | ||
| 135 | } | 137 | } |
| 136 | } | 138 | } |
src/AppBundle/Entity/PlanHistoricoNacionalEstrategico.php~
| @@ -0,0 +1,52 @@ | @@ -0,0 +1,52 @@ | ||
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +namespace AppBundle\Entity; | ||
| 4 | + | ||
| 5 | +use Doctrine\ORM\Mapping as ORM; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * PlanHistoricoNacionalEstrategico | ||
| 9 | + * | ||
| 10 | + * @ORM\Table(name="plan_historico_nacional_estrategico", uniqueConstraints={@ORM\UniqueConstraint(name="uq_estrategico", columns={"numero"})}, indexes={@ORM\Index(name="fki_id_nacional_estrategico", columns={"id_plan_historico_nacional"})}) | ||
| 11 | + * @ORM\Entity | ||
| 12 | + */ | ||
| 13 | +class PlanHistoricoNacionalEstrategico | ||
| 14 | +{ | ||
| 15 | + /** | ||
| 16 | + * @var string | ||
| 17 | + * | ||
| 18 | + * @ORM\Column(name="nombre", type="string", length=40, nullable=false, options={"comment" = "nombre de plan_historico_nacional_estrategico"}) | ||
| 19 | + */ | ||
| 20 | + private $nombre; | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * @var integer | ||
| 24 | + * | ||
| 25 | + * @ORM\Column(name="numero", type="integer", nullable=false, options={"comment" = "codigo plan_historico_nacional_estrategico"}) | ||
| 26 | + */ | ||
| 27 | + private $numero; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * @var integer | ||
| 31 | + * | ||
| 32 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "identificador de la plan_historico_nacional_estrategico"}) | ||
| 33 | + * @ORM\Id | ||
| 34 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
| 35 | + * @ORM\SequenceGenerator(sequenceName="parroquia_id_seq", allocationSize=1, initialValue=1) | ||
| 36 | + */ | ||
| 37 | + private $id; | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * @var \AppBundle\Entity\PlanHistoricoNacional | ||
| 41 | + * | ||
| 42 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\PlanHistoricoNacional") | ||
| 43 | + * @ORM\JoinColumns({ | ||
| 44 | + * @ORM\JoinColumn(name="id_plan_historico_nacional", referencedColumnName="id", nullable=false) | ||
| 45 | + * }) | ||
| 46 | + */ | ||
| 47 | + private $idPlanHistoricoNacional; | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + | ||
| 52 | +} |