Deposito.php
7.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<?php
namespace UBV\SurUbvBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
/**
* UBV\SurUbvBundle\Entity\Deposito
*
* @ORM\Entity(repositoryClass="UBV\SurUbvBundle\Entity\DepositoRepository")
* @ORM\Table(name="deposito", indexes={@ORM\Index(name="fk_deposito_cuenta_bancaria1_idx", columns={"cuenta_bancaria_id"}), @ORM\Index(name="fk_deposito_persona1_idx", columns={"persona_id"}), @ORM\Index(name="fk_deposito_deposito_tipo1_idx", columns={"deposito_tipo_id"})}, uniqueConstraints={@ORM\UniqueConstraint(name="id_deposito_UNIQUE", columns={"id"}), @ORM\UniqueConstraint(name="num_deposito_UNIQUE", columns={"num_deposito"})})
*/
class Deposito
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="IDENTITY")
* @ORM\SequenceGenerator(sequenceName="deposito_id_seq", allocationSize=1, initialValue=1)
*/
protected $id;
/**
* @Assert\NotNull(message= "Por favor introduzca un número de deposito", groups={"Default"})
* @Assert\NotBlank( message= "Por favor introduzca un número de deposito", groups={"Default"})
* @ORM\Column(type="integer")
*/
protected $num_deposito;
/**
* @Assert\NotNull(message= "Por favor introduzca el monto en Bs. depositado", groups={"Default"})
* @Assert\NotBlank( message= "Por favor introduzca el monto en Bs. depositado", groups={"Default"})
* @ORM\Column(type="float")
*/
protected $monto;
/**
* @ORM\ManyToOne(targetEntity="Arancel", inversedBy="depositos")
* @ORM\JoinColumn(name="arancel_id", referencedColumnName="id", nullable=false)
*/
protected $arancel;
/**
* @ORM\Column(type="date")
*/
protected $fecha_deposito;
/**
* @ORM\OneToMany(targetEntity="DepositoDetalle", mappedBy="deposito")
* @ORM\JoinColumn(name="id", referencedColumnName="deposito_id", nullable=false)
*/
protected $depositoDetalles;
/**
* @ORM\ManyToOne(targetEntity="CuentaBancaria", inversedBy="depositos")
* @ORM\JoinColumn(name="cuenta_bancaria_id", referencedColumnName="id", nullable=false)
*/
protected $cuentaBancaria;
/**
* @ORM\ManyToOne(targetEntity="Persona", inversedBy="depositos")
* @ORM\JoinColumn(name="persona_id", referencedColumnName="id", nullable=false)
*/
protected $persona;
/**
* @ORM\ManyToOne(targetEntity="DepositoTipo", inversedBy="depositos")
* @ORM\JoinColumn(name="deposito_tipo_id", referencedColumnName="id", nullable=false)
*/
protected $depositoTipo;
/**
* @ORM\ManyToMany(targetEntity="Arancel", inversedBy="depositos")
* @ORM\JoinTable(name="deposito_arancel",
* joinColumns={@ORM\JoinColumn(name="deposito_id", referencedColumnName="id", nullable=false)},
* inverseJoinColumns={@ORM\JoinColumn(name="arancel_id", referencedColumnName="id", nullable=false)}
* )
*/
protected $arancels;
public function __construct()
{
$this->depositoDetalles = new ArrayCollection();
$this->arancels = new ArrayCollection();
}
public function __sleep()
{
return array('id', 'num_deposito', 'monto', 'cuenta_bancaria_id', 'persona_id', 'fecha_deposito', 'deposito_tipo_id');
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set num_deposito
*
* @param integer $numDeposito
* @return Deposito
*/
public function setNumDeposito($numDeposito)
{
$this->num_deposito = $numDeposito;
return $this;
}
/**
* Set monto
*
* @param float $monto
* @return Deposito
*/
public function setMonto($monto)
{
$this->monto = $monto;
return $this;
}
/**
* Get monto
*
* @return float
*/
public function getMonto()
{
return $this->monto;
}
/**
* Set fecha_deposito
*
* @param \DateTime $fechaDeposito
* @return Deposito
*/
public function setFechaDeposito($fechaDeposito)
{
$this->fecha_deposito = $fechaDeposito;
return $this;
}
/**
* Get fecha_deposito
*
* @return \DateTime
*/
public function getFechaDeposito()
{
return $this->fecha_deposito;
}
/**
* Add depositoDetalles
*
* @param \UBV\SurUbvBundle\Entity\DepositoDetalle $depositoDetalles
* @return Deposito
*/
public function addDepositoDetalle(\UBV\SurUbvBundle\Entity\DepositoDetalle $depositoDetalles)
{
$this->depositoDetalles[] = $depositoDetalles;
return $this;
}
/**
* Remove depositoDetalles
*
* @param \UBV\SurUbvBundle\Entity\DepositoDetalle $depositoDetalles
*/
public function removeDepositoDetalle(\UBV\SurUbvBundle\Entity\DepositoDetalle $depositoDetalles)
{
$this->depositoDetalles->removeElement($depositoDetalles);
}
/**
* Get depositoDetalles
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getDepositoDetalles()
{
return $this->depositoDetalles;
}
/**
* Set cuentaBancaria
*
* @param \UBV\SurUbvBundle\Entity\CuentaBancaria $cuentaBancaria
* @return Deposito
*/
public function setCuentaBancaria(\UBV\SurUbvBundle\Entity\CuentaBancaria $cuentaBancaria)
{
$this->cuentaBancaria = $cuentaBancaria;
return $this;
}
/**
* Get cuentaBancaria
*
* @return \UBV\SurUbvBundle\Entity\CuentaBancaria
*/
public function getCuentaBancaria()
{
return $this->cuentaBancaria;
}
/**
* Set persona
*
* @param \UBV\SurUbvBundle\Entity\Persona $persona
* @return Deposito
*/
public function setPersona(\UBV\SurUbvBundle\Entity\Persona $persona)
{
$this->persona = $persona;
return $this;
}
/**
* Get persona
*
* @return \UBV\SurUbvBundle\Entity\Persona
*/
public function getPersona()
{
return $this->persona;
}
/**
* Set depositoTipo
*
* @param \UBV\SurUbvBundle\Entity\DepositoTipo $depositoTipo
* @return Deposito
*/
public function setDepositoTipo(\UBV\SurUbvBundle\Entity\DepositoTipo $depositoTipo)
{
$this->depositoTipo = $depositoTipo;
return $this;
}
/**
* Get depositoTipo
*
* @return \UBV\SurUbvBundle\Entity\DepositoTipo
*/
public function getDepositoTipo()
{
return $this->depositoTipo;
}
/**
* Add arancels
*
* @param \UBV\SurUbvBundle\Entity\Arancel $arancels
* @return Deposito
*/
public function addArancel(\UBV\SurUbvBundle\Entity\Arancel $arancels)
{
$this->arancels[] = $arancels;
return $this;
}
/**
* Remove arancels
*
* @param \UBV\SurUbvBundle\Entity\Arancel $arancels
*/
public function removeArancel(\UBV\SurUbvBundle\Entity\Arancel $arancels)
{
$this->arancels->removeElement($arancels);
}
/**
* Get arancels
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getArancels()
{
return $this->arancels;
}
/**
* Get num_deposito
*
* @return integer
*/
public function getNumDeposito()
{
return $this->num_deposito;
}
/**
* Set arancel
*
* @param \UBV\SurUbvBundle\Entity\Arancel $arancel
* @return Deposito
*/
public function setArancel(\UBV\SurUbvBundle\Entity\Arancel $arancel)
{
$this->arancel = $arancel;
return $this;
}
/**
* Get arancel
*
* @return \UBV\SurUbvBundle\Entity\Arancel
*/
public function getArancel()
{
return $this->arancel;
}
}