Commit c131a5d024e5e1d2321eae220c57ae65407f79bc

Authored by Wilmer Ramones
1 parent 0cd8a7c7e5
Exists in master

actualizada la entidad ascendo con una relacion uno a muchos con los tutores

src/AppBundle/Entity/Ascenso.php
@@ -137,6 +137,12 @@ class Ascenso @@ -137,6 +137,12 @@ class Ascenso
137 * }) 137 * })
138 */ 138 */
139 protected $idEstatus; 139 protected $idEstatus;
  140 +
  141 +
  142 + /**
  143 + * @ORM\OneToMany(targetEntity="AppBundle\Entity\TutoresAscenso", mappedBy="ascenso")
  144 + */
  145 + private $tutores_asignados;
140 146
141 147
142 /** 148 /**
@@ -441,4 +447,44 @@ class Ascenso @@ -441,4 +447,44 @@ class Ascenso
441 { 447 {
442 return $this->idEscalafones; 448 return $this->idEscalafones;
443 } 449 }
  450 + /**
  451 + * Constructor
  452 + */
  453 + public function __construct()
  454 + {
  455 + $this->tutores_asignados = new \Doctrine\Common\Collections\ArrayCollection();
  456 + }
  457 +
  458 + /**
  459 + * Add tutores_asignados
  460 + *
  461 + * @param \AppBundle\Entity\TutoresAscenso $tutoresAsignados
  462 + * @return Ascenso
  463 + */
  464 + public function addTutoresAsignado(\AppBundle\Entity\TutoresAscenso $tutoresAsignados)
  465 + {
  466 + $this->tutores_asignados[] = $tutoresAsignados;
  467 +
  468 + return $this;
  469 + }
  470 +
  471 + /**
  472 + * Remove tutores_asignados
  473 + *
  474 + * @param \AppBundle\Entity\TutoresAscenso $tutoresAsignados
  475 + */
  476 + public function removeTutoresAsignado(\AppBundle\Entity\TutoresAscenso $tutoresAsignados)
  477 + {
  478 + $this->tutores_asignados->removeElement($tutoresAsignados);
  479 + }
  480 +
  481 + /**
  482 + * Get tutores_asignados
  483 + *
  484 + * @return \Doctrine\Common\Collections\Collection
  485 + */
  486 + public function getTutoresAsignados()
  487 + {
  488 + return $this->tutores_asignados;
  489 + }
444 } 490 }
src/AppBundle/Entity/Ascenso.php~
@@ -9,7 +9,7 @@ use Symfony\Component\Validator\Constraints as Assert; @@ -9,7 +9,7 @@ use Symfony\Component\Validator\Constraints as Assert;
9 /** 9 /**
10 * Ascenso 10 * Ascenso
11 * 11 *
12 - * @ORM\Table(name="solicitud_ascenso", uniqueConstraints={@ORM\UniqueConstraint(name="ascenso_id_rol_institucion_docente_escala", columns={"id_rol_institucion", "id_escala"})}) 12 + * @ORM\Table(name="solicitud_ascenso", uniqueConstraints={@ORM\UniqueConstraint(name="ascenso_id_rol_institucion_docente_escalafones", columns={"id_rol_institucion", "id_escalafones"})})
13 * @ORM\Entity 13 * @ORM\Entity
14 * @ORM\HasLifecycleCallbacks() 14 * @ORM\HasLifecycleCallbacks()
15 */ 15 */
@@ -40,11 +40,11 @@ class Ascenso @@ -40,11 +40,11 @@ class Ascenso
40 40
41 41
42 /** 42 /**
43 - * @var \AppBundle\Entity\Escala 43 + * @var \AppBundle\Entity\Escalafones
44 * 44 *
45 * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Escalafones") 45 * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Escalafones")
46 * @ORM\JoinColumns({ 46 * @ORM\JoinColumns({
47 - * @ORM\JoinColumn(name="id_escala", referencedColumnName="id", nullable=false) 47 + * @ORM\JoinColumn(name="id_escalafones", referencedColumnName="id", nullable=false)
48 * }) 48 * })
49 */ 49 */
50 protected $idEscalafones; 50 protected $idEscalafones;
@@ -137,6 +137,12 @@ class Ascenso @@ -137,6 +137,12 @@ class Ascenso
137 * }) 137 * })
138 */ 138 */
139 protected $idEstatus; 139 protected $idEstatus;
  140 +
  141 +
  142 + /**
  143 + * @ORM\OneToMany(targetEntity="AppBundle\Entity\TutoresAscenso", mappedBy="ascenso")
  144 + */
  145 + private $tutores_asignados;
140 146
141 147
142 /** 148 /**
@@ -418,4 +424,27 @@ class Ascenso @@ -418,4 +424,27 @@ class Ascenso
418 424
419 425
420 426
  427 +
  428 + /**
  429 + * Set idEscalafones
  430 + *
  431 + * @param \AppBundle\Entity\Escalafones $idEscalafones
  432 + * @return Ascenso
  433 + */
  434 + public function setIdEscalafones(\AppBundle\Entity\Escalafones $idEscalafones)
  435 + {
  436 + $this->idEscalafones = $idEscalafones;
  437 +
  438 + return $this;
  439 + }
  440 +
  441 + /**
  442 + * Get idEscalafones
  443 + *
  444 + * @return \AppBundle\Entity\Escalafones
  445 + */
  446 + public function getIdEscalafones()
  447 + {
  448 + return $this->idEscalafones;
  449 + }
421 } 450 }