From c6c02b91d4c192a9caaa6d6ffa0c2faea0222273 Mon Sep 17 00:00:00 2001 From: Wilmer Ramones Date: Tue, 19 Jul 2016 09:08:24 -0400 Subject: [PATCH] Corregido y enlazada la entidad de tipo uc con las emas entidades --- src/AppBundle/Entity/MallaCurricularUc.php | 10 +- src/AppBundle/Entity/TipoUc.php | 2 +- src/AppBundle/Entity/TrayectoTramoModalidad.php | 135 ----------------- .../Entity/TrayectoTramoModalidadTipo.php | 168 +++++++++++++++++++++ src/AppBundle/Entity/UnidadCurricular.php | 9 ++ 5 files changed, 183 insertions(+), 141 deletions(-) delete mode 100644 src/AppBundle/Entity/TrayectoTramoModalidad.php create mode 100644 src/AppBundle/Entity/TrayectoTramoModalidadTipo.php diff --git a/src/AppBundle/Entity/MallaCurricularUc.php b/src/AppBundle/Entity/MallaCurricularUc.php index fec38ea..1e024fe 100644 --- a/src/AppBundle/Entity/MallaCurricularUc.php +++ b/src/AppBundle/Entity/MallaCurricularUc.php @@ -40,9 +40,9 @@ class MallaCurricularUc private $idUnidadCurricularVolumen; /** - * @var \AppBundle\Entity\TrayectoTramoModalidad + * @var \AppBundle\Entity\TrayectoTramoModalidadTipo * - * @ORM\ManyToOne(targetEntity="AppBundle\Entity\TrayectoTramoModalidad") + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\TrayectoTramoModalidadTipo") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="id_trayecto_tramo_mod", referencedColumnName="id", nullable=false) * }) @@ -119,10 +119,10 @@ class MallaCurricularUc /** * Set idTrayectoTramoMod * - * @param \AppBundle\Entity\TrayectoTramoModalidad $idTrayectoTramoMod + * @param \AppBundle\Entity\TrayectoTramoModalidadTipo $idTrayectoTramoMod * @return MallaCurricularUc */ - public function setIdTrayectoTramoMod(\AppBundle\Entity\TrayectoTramoModalidad $idTrayectoTramoMod) + public function setIdTrayectoTramoMod(\AppBundle\Entity\TrayectoTramoModalidadTipo $idTrayectoTramoMod) { $this->idTrayectoTramoMod = $idTrayectoTramoMod; @@ -132,7 +132,7 @@ class MallaCurricularUc /** * Get idTrayectoTramoMod * - * @return \AppBundle\Entity\TrayectoTramoModalidad + * @return \AppBundle\Entity\TrayectoTramoModalidadTipo */ public function getIdTrayectoTramoMod() { diff --git a/src/AppBundle/Entity/TipoUc.php b/src/AppBundle/Entity/TipoUc.php index 2ad0e24..bed5aed 100644 --- a/src/AppBundle/Entity/TipoUc.php +++ b/src/AppBundle/Entity/TipoUc.php @@ -15,7 +15,7 @@ class TipoUc /** * @var string * - * @ORM\Column(name="nombre", type="string", length=10, nullable=false, options={"comment" = "nombre del tipo de unidad curricular (optativa, obligatoria, electiva)"}) + * @ORM\Column(name="nombre", type="string", length=80, nullable=false, options={"comment" = "nombre del tipo de unidad curricular (optativa, obligatoria, electiva)"}) */ private $nombre; diff --git a/src/AppBundle/Entity/TrayectoTramoModalidad.php b/src/AppBundle/Entity/TrayectoTramoModalidad.php deleted file mode 100644 index 208c221..0000000 --- a/src/AppBundle/Entity/TrayectoTramoModalidad.php +++ /dev/null @@ -1,135 +0,0 @@ -id; - } - - /** - * Set idTrayecto - * - * @param \AppBundle\Entity\Trayecto $idTrayecto - * @return TrayectoTramoModalidad - */ - public function setIdTrayecto(\AppBundle\Entity\Trayecto $idTrayecto) - { - $this->idTrayecto = $idTrayecto; - - return $this; - } - - /** - * Get idTrayecto - * - * @return \AppBundle\Entity\Trayecto - */ - public function getIdTrayecto() - { - return $this->idTrayecto; - } - - /** - * Set idTramo - * - * @param \AppBundle\Entity\Tramo $idTramo - * @return TrayectoTramoModalidad - */ - public function setIdTramo(\AppBundle\Entity\Tramo $idTramo) - { - $this->idTramo = $idTramo; - - return $this; - } - - /** - * Get idTramo - * - * @return \AppBundle\Entity\Tramo - */ - public function getIdTramo() - { - return $this->idTramo; - } - - /** - * Set idModalidad - * - * @param \AppBundle\Entity\Modalidad $idModalidad - * @return TrayectoTramoModalidad - */ - public function setIdModalidad(\AppBundle\Entity\Modalidad $idModalidad) - { - $this->idModalidad = $idModalidad; - - return $this; - } - - /** - * Get idModalidad - * - * @return \AppBundle\Entity\Modalidad - */ - public function getIdModalidad() - { - return $this->idModalidad; - } -} diff --git a/src/AppBundle/Entity/TrayectoTramoModalidadTipo.php b/src/AppBundle/Entity/TrayectoTramoModalidadTipo.php new file mode 100644 index 0000000..784a1ad --- /dev/null +++ b/src/AppBundle/Entity/TrayectoTramoModalidadTipo.php @@ -0,0 +1,168 @@ +id; + } + + /** + * Set idTrayecto + * + * @param \AppBundle\Entity\Trayecto $idTrayecto + * @return TrayectoTramoModalidadTipo + */ + public function setIdTrayecto(\AppBundle\Entity\Trayecto $idTrayecto) + { + $this->idTrayecto = $idTrayecto; + + return $this; + } + + /** + * Get idTrayecto + * + * @return \AppBundle\Entity\Trayecto + */ + public function getIdTrayecto() + { + return $this->idTrayecto; + } + + /** + * Set idTramo + * + * @param \AppBundle\Entity\Tramo $idTramo + * @return TrayectoTramoModalidadTipo + */ + public function setIdTramo(\AppBundle\Entity\Tramo $idTramo) + { + $this->idTramo = $idTramo; + + return $this; + } + + /** + * Get idTramo + * + * @return \AppBundle\Entity\Tramo + */ + public function getIdTramo() + { + return $this->idTramo; + } + + /** + * Set idModalidad + * + * @param \AppBundle\Entity\Modalidad $idModalidad + * @return TrayectoTramoModalidadTipo + */ + public function setIdModalidad(\AppBundle\Entity\Modalidad $idModalidad) + { + $this->idModalidad = $idModalidad; + + return $this; + } + + /** + * Get idModalidad + * + * @return \AppBundle\Entity\Modalidad + */ + public function getIdModalidad() + { + return $this->idModalidad; + } + + /** + * Set idTipoUc + * + * @param \AppBundle\Entity\TipoUc $idTipoUc + * @return TrayectoTramoModalidadTipo + */ + public function setIdTipoUc(\AppBundle\Entity\TipoUc $idTipoUc) + { + $this->idTipoUc = $idTipoUc; + + return $this; + } + + /** + * Get idTipoUc + * + * @return \AppBundle\Entity\TipoUc + */ + public function getIdTipoUc() + { + return $this->idTipoUc; + } +} diff --git a/src/AppBundle/Entity/UnidadCurricular.php b/src/AppBundle/Entity/UnidadCurricular.php index 8d73711..7e86fd5 100644 --- a/src/AppBundle/Entity/UnidadCurricular.php +++ b/src/AppBundle/Entity/UnidadCurricular.php @@ -155,4 +155,13 @@ class UnidadCurricular { return $this->creditos; } + + /** + * + * @return string + */ + + public function __toString() { + return $this->getNombre(); + } } -- 2.0.0