Commit eb3305bd00eba9b8ab535c32df0320729b2df116
1 parent
7da7a08af2
Exists in
master
Creada la entidad de tipo de uc (obligatoria, electiva...)
Showing
1 changed file
with
75 additions
and
0 deletions
Show diff stats
src/AppBundle/Entity/TipoUc.php
... | ... | @@ -0,0 +1,75 @@ |
1 | +<?php | |
2 | + | |
3 | +namespace AppBundle\Entity; | |
4 | + | |
5 | +use Doctrine\ORM\Mapping as ORM; | |
6 | + | |
7 | +/** | |
8 | + * TipoUc | |
9 | + * | |
10 | + * @ORM\Table(name="tipo_uc", uniqueConstraints={@ORM\UniqueConstraint(name="uq_tipouc_nombre", columns={"nombre"})}) | |
11 | + * @ORM\Entity | |
12 | + */ | |
13 | +class TipoUc | |
14 | +{ | |
15 | + /** | |
16 | + * @var string | |
17 | + * | |
18 | + * @ORM\Column(name="nombre", type="string", length=10, nullable=false, options={"comment" = "nombre del tipo de unidad curricular (optativa, obligatoria, electiva)"}) | |
19 | + */ | |
20 | + private $nombre; | |
21 | + | |
22 | + /** | |
23 | + * @var integer | |
24 | + * | |
25 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "identificador del tipo de unidad curricular"}) | |
26 | + * @ORM\Id | |
27 | + * @ORM\GeneratedValue(strategy="IDENTITY") | |
28 | + * @ORM\SequenceGenerator(sequenceName="tipo_uc_id_seq", allocationSize=1, initialValue=1) | |
29 | + */ | |
30 | + private $id; | |
31 | + | |
32 | + | |
33 | + | |
34 | + /** | |
35 | + * Set nombre | |
36 | + * | |
37 | + * @param string $nombre | |
38 | + * @return Tramo | |
39 | + */ | |
40 | + public function setNombre($nombre) | |
41 | + { | |
42 | + $this->nombre = $nombre; | |
43 | + | |
44 | + return $this; | |
45 | + } | |
46 | + | |
47 | + /** | |
48 | + * Get nombre | |
49 | + * | |
50 | + * @return string | |
51 | + */ | |
52 | + public function getNombre() | |
53 | + { | |
54 | + return $this->nombre; | |
55 | + } | |
56 | + | |
57 | + /** | |
58 | + * Get id | |
59 | + * | |
60 | + * @return integer | |
61 | + */ | |
62 | + public function getId() | |
63 | + { | |
64 | + return $this->id; | |
65 | + } | |
66 | + | |
67 | + /** | |
68 | + * | |
69 | + * @return string | |
70 | + */ | |
71 | + | |
72 | + public function __toString() { | |
73 | + return $this->getNombre(); | |
74 | + } | |
75 | +} | ... | ... |