Aviso::setAnotacion()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/*
3
  GESTCONV - Aplicación web para la gestión de la convivencia en centros educativos
4
5
  Copyright (C) 2015: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Entity;
22
23
use Doctrine\ORM\Mapping as ORM;
24
25
/**
26
 * @ORM\MappedSuperclass
27
 */
28
class Aviso
29
{
30
    /**
31
     * @ORM\Id
32
     * @ORM\Column(type="integer")
33
     * @ORM\GeneratedValue
34
     */
35
    protected $id;
36
    /**
37
     * @ORM\ManyToOne(targetEntity="CategoriaAviso")
38
     * @ORM\JoinColumn(nullable=false)
39
     * @var CategoriaAviso
40
     */
41
    protected $tipo;
42
    /**
43
     * @ORM\ManyToOne(targetEntity="Usuario")
44
     * @ORM\JoinColumn(nullable=false)
45
     */
46
    protected $usuario;
47
    /**
48
     * @ORM\Column(type="datetime", nullable=false)
49
     * @var \DateTime
50
     */
51
    protected $fecha;
52
    /**
53
     * @ORM\Column(type="text")
54
     * @var string
55
     */
56
    protected $anotacion;
57
58
    /**
59
     * Get id
60
     *
61
     * @return integer
62
     */
63
    public function getId()
64
    {
65
        return $this->id;
66
    }
67
68
    /**
69
     * Set anotacion
70
     *
71
     * @param string $anotacion
72
     * @return Aviso
73
     */
74
    public function setAnotacion($anotacion)
75
    {
76
        $this->anotacion = $anotacion;
77
78
        return $this;
79
    }
80
81
    /**
82
     * Get anotacion
83
     *
84
     * @return string
85
     */
86
    public function getAnotacion()
87
    {
88
        return $this->anotacion;
89
    }
90
91
    /**
92
     * Get usuario
93
     *
94
     * @return Usuario
95
     */
96
    public function getUsuario()
97
    {
98
        return $this->usuario;
99
    }
100
101
    /**
102
     * Set tipo
103
     *
104
     * @param CategoriaAviso $tipo
105
     * @return Aviso
106
     */
107
    public function setTipo(CategoriaAviso $tipo = null)
108
    {
109
        $this->tipo = $tipo;
110
111
        return $this;
112
    }
113
114
    /**
115
     * Get tipo
116
     *
117
     * @return CategoriaAviso
118
     */
119
    public function getTipo()
120
    {
121
        return $this->tipo;
122
    }
123
124
    /**
125
     * Set usuario
126
     *
127
     * @param Usuario $usuario
128
     * @return Aviso
129
     */
130
    public function setUsuario(Usuario $usuario = null)
131
    {
132
        $this->usuario = $usuario;
133
134
        return $this;
135
    }
136
137
    /**
138
     * Get fecha
139
     *
140
     * @return \DateTime
141
     */
142
    public function getFecha()
143
    {
144
        return $this->fecha;
145
    }
146
147
    /**
148
     * Set fecha
149
     *
150
     * @param \DateTime $fecha
151
     * @return Aviso
152
     */
153
    public function setFecha($fecha)
154
    {
155
        $this->fecha = $fecha;
156
157
        return $this;
158
    }
159
}
160