Commit 95ba59582801bdcc48cfa1dde6d66808d9921877
1 parent
93f193716f
Exists in
master
Creada la entidad que registra los memos creados desde el sistema
Showing
1 changed file
with
209 additions
and
0 deletions
Show diff stats
src/AppBundle/Entity/Memorando.php
| @@ -0,0 +1,209 @@ | @@ -0,0 +1,209 @@ | ||
| 1 | +<?php | ||
| 2 | + | ||
| 3 | +/* | ||
| 4 | + * Copyright (C) 2016 ubv-cipee | ||
| 5 | + * | ||
| 6 | + * This program is free software: you can redistribute it and/or modify | ||
| 7 | + * it under the terms of the GNU General Public License as published by | ||
| 8 | + * the Free Software Foundation, either version 3 of the License, or | ||
| 9 | + * (at your option) any later version. | ||
| 10 | + * | ||
| 11 | + * This program is distributed in the hope that it will be useful, | ||
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | + * GNU General Public License for more details. | ||
| 15 | + * | ||
| 16 | + * You should have received a copy of the GNU General Public License | ||
| 17 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | + */ | ||
| 19 | + | ||
| 20 | +namespace AppBundle\Entity; | ||
| 21 | +use Doctrine\ORM\Mapping as ORM; | ||
| 22 | +use Symfony\Component\Validator\Constraints as Assert; | ||
| 23 | + | ||
| 24 | +/** | ||
| 25 | + * Memorando | ||
| 26 | + * | ||
| 27 | + * @ORM\Table(name="memorandos", uniqueConstraints={@ORM\UniqueConstraint(name="memorando_id_docente_servicio", columns={"id_docente_servicio"})}) | ||
| 28 | + * @ORM\Entity | ||
| 29 | + * @ORM\HasLifecycleCallbacks() | ||
| 30 | + */ | ||
| 31 | +class Memorando { | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * @var integer | ||
| 35 | + * | ||
| 36 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador de la Adscripcion"}) | ||
| 37 | + * @ORM\Id | ||
| 38 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
| 39 | + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1) | ||
| 40 | + */ | ||
| 41 | + private $id; | ||
| 42 | + | ||
| 43 | + | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * @var \AppBundle\Entity\DocenteServicio | ||
| 47 | + * | ||
| 48 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\DocenteServicio") | ||
| 49 | + * @ORM\JoinColumns({ | ||
| 50 | + * @ORM\JoinColumn(name="id_docente_servicio", referencedColumnName="id", nullable=false) | ||
| 51 | + * }) | ||
| 52 | + */ | ||
| 53 | + protected $idDocenteServicio; | ||
| 54 | + | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * @var integer | ||
| 58 | + * | ||
| 59 | + * @ORM\Column(name="correlativo", type="integer", nullable=false, options={"comment" = "numero de memo"}) | ||
| 60 | + */ | ||
| 61 | + protected $correlativo; | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * @var integer | ||
| 65 | + * | ||
| 66 | + * @ORM\Column(name="ano", type="integer", nullable=false, options={"comment" = "año del memo"}) | ||
| 67 | + */ | ||
| 68 | + protected $ano; | ||
| 69 | + | ||
| 70 | + /** @ORM\Column(name="fecha_memo", type="datetime", nullable=false, options={"comment" = "Fecha de actualizada la solicitud"}) | ||
| 71 | + /** | ||
| 72 | + * @Assert\Date() | ||
| 73 | + */ | ||
| 74 | + private $fecha_memo; | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * @var \AppBundle\Entity\Estatus | ||
| 79 | + * | ||
| 80 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Estatus") | ||
| 81 | + * @ORM\JoinColumns({ | ||
| 82 | + * @ORM\JoinColumn(name="id_estatus", referencedColumnName="id", nullable=false) | ||
| 83 | + * }) | ||
| 84 | + */ | ||
| 85 | + protected $idEstatus; | ||
| 86 | + | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * Get id | ||
| 90 | + * | ||
| 91 | + * @return integer | ||
| 92 | + */ | ||
| 93 | + public function getId() | ||
| 94 | + { | ||
| 95 | + return $this->id; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * Get id | ||
| 100 | + * | ||
| 101 | + * @return integer | ||
| 102 | + */ | ||
| 103 | + public function getCorrelativo() | ||
| 104 | + { | ||
| 105 | + return $this->correlativo; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + /** | ||
| 109 | + * Set correlativo | ||
| 110 | + * | ||
| 111 | + * @param integer $correlativo | ||
| 112 | + * @return Memorando | ||
| 113 | + */ | ||
| 114 | + public function setCorrelativo($correlativo) | ||
| 115 | + { | ||
| 116 | + $this->correlativo = $correlativo; | ||
| 117 | + | ||
| 118 | + return $this; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * Get id | ||
| 124 | + * | ||
| 125 | + * @return integer | ||
| 126 | + */ | ||
| 127 | + public function getAno() | ||
| 128 | + { | ||
| 129 | + return $this->ano; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + /** | ||
| 133 | + * Set ano | ||
| 134 | + * | ||
| 135 | + * @param integer $ano | ||
| 136 | + * @return Memorando | ||
| 137 | + */ | ||
| 138 | + public function setAno($ano) | ||
| 139 | + { | ||
| 140 | + $this->ano = $ano; | ||
| 141 | + | ||
| 142 | + return $this; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + | ||
| 146 | + | ||
| 147 | + /** | ||
| 148 | + * Set idDocenteServicio | ||
| 149 | + * | ||
| 150 | + * @param \AppBundle\Entity\DocenteServicio $idDocenteServicio | ||
| 151 | + * @return DocenteServicio | ||
| 152 | + */ | ||
| 153 | + public function setIdDocenteServicio(\AppBundle\Entity\DocenteServicio $idDocenteServicio = null) | ||
| 154 | + { | ||
| 155 | + $this->idDocenteServicio = $idDocenteServicio; | ||
| 156 | + | ||
| 157 | + return $this; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + /** | ||
| 161 | + * Get idDocenteServicio | ||
| 162 | + * | ||
| 163 | + * @return \AppBundle\Entity\DocenteServicio | ||
| 164 | + */ | ||
| 165 | + public function getIdDocenteServicio() | ||
| 166 | + { | ||
| 167 | + return $this->idDocenteServicio; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + | ||
| 171 | + /** | ||
| 172 | + * @ORM\PrePersist | ||
| 173 | + */ | ||
| 174 | + public function setFechaMemo() | ||
| 175 | + { | ||
| 176 | + $this->fecha_memo = new \DateTime(); | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + public function getFechaMemo() | ||
| 180 | + { | ||
| 181 | + return $this->fecha_memo; | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + | ||
| 185 | + /** | ||
| 186 | + * Set idEstatus | ||
| 187 | + * | ||
| 188 | + * @param \AppBundle\Entity\Estatus $idEstatus | ||
| 189 | + * @return Estatus | ||
| 190 | + */ | ||
| 191 | + public function setIdEstatus(\AppBundle\Entity\Estatus $idEstatus = null) | ||
| 192 | + { | ||
| 193 | + $this->idEstatus = $idEstatus; | ||
| 194 | + | ||
| 195 | + return $this; | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | + /** | ||
| 199 | + * Get idEstatus | ||
| 200 | + * | ||
| 201 | + * @return \AppBundle\Entity\Estatus | ||
| 202 | + */ | ||
| 203 | + public function getIdEstatus() | ||
| 204 | + { | ||
| 205 | + return $this->idEstatus; | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + | ||
| 209 | +} |