|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Created by PhpStorm. |
|
4
|
|
|
* User: Giansalex |
|
5
|
|
|
* Date: 16/07/2017 |
|
6
|
|
|
* Time: 21:03 |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace Greenter\Model\Company; |
|
10
|
|
|
|
|
11
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* Class Address |
|
15
|
|
|
* @package Greenter\Model\Company |
|
16
|
|
|
*/ |
|
17
|
|
|
class Address |
|
18
|
|
|
{ |
|
19
|
|
|
/** |
|
20
|
|
|
* @Assert\NotBlank() |
|
21
|
|
|
* @Assert\Length(max="6") |
|
22
|
|
|
* @var string |
|
23
|
|
|
*/ |
|
24
|
|
|
private $ubigueo; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* @Assert\Length(max="2") |
|
28
|
|
|
* @var string |
|
29
|
|
|
*/ |
|
30
|
|
|
private $codigoPais; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* @Assert\Length(max="30") |
|
34
|
|
|
* @var string |
|
35
|
|
|
*/ |
|
36
|
|
|
private $departamento; |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @Assert\Length(max="30") |
|
40
|
|
|
* @var string |
|
41
|
|
|
*/ |
|
42
|
|
|
private $provincia; |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @Assert\Length(max="100") |
|
46
|
|
|
* @var string |
|
47
|
|
|
*/ |
|
48
|
|
|
private $distrito; |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* @Assert\Length(max="25") |
|
52
|
|
|
* @var string |
|
53
|
|
|
*/ |
|
54
|
|
|
private $urbanizacion; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @Assert\Length(max="100") |
|
58
|
|
|
* @var string |
|
59
|
|
|
*/ |
|
60
|
|
|
private $direccion; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* Address constructor. |
|
64
|
|
|
*/ |
|
65
|
2 |
|
public function __construct() |
|
66
|
|
|
{ |
|
67
|
2 |
|
$this->codigoPais = 'PE'; |
|
68
|
2 |
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @return string |
|
72
|
|
|
*/ |
|
73
|
|
|
public function getUbigueo() |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->ubigueo; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
/** |
|
79
|
|
|
* @param string $ubigueo |
|
80
|
|
|
* @return Address |
|
81
|
|
|
*/ |
|
82
|
2 |
|
public function setUbigueo($ubigueo) |
|
83
|
|
|
{ |
|
84
|
2 |
|
$this->ubigueo = $ubigueo; |
|
85
|
2 |
|
return $this; |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
/** |
|
89
|
|
|
* @return string |
|
90
|
|
|
*/ |
|
91
|
|
|
public function getCodigoPais() |
|
92
|
|
|
{ |
|
93
|
|
|
return $this->codigoPais; |
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* @param string $codigoPais |
|
98
|
|
|
* @return Address |
|
99
|
|
|
*/ |
|
100
|
|
|
public function setCodigoPais($codigoPais) |
|
101
|
|
|
{ |
|
102
|
|
|
$this->codigoPais = $codigoPais; |
|
103
|
|
|
return $this; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* @return string |
|
108
|
|
|
*/ |
|
109
|
|
|
public function getDepartamento() |
|
110
|
|
|
{ |
|
111
|
|
|
return $this->departamento; |
|
112
|
|
|
} |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* @param string $departamento |
|
116
|
|
|
* @return Address |
|
117
|
|
|
*/ |
|
118
|
2 |
|
public function setDepartamento($departamento) |
|
119
|
|
|
{ |
|
120
|
2 |
|
$this->departamento = $departamento; |
|
121
|
2 |
|
return $this; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
/** |
|
125
|
|
|
* @return string |
|
126
|
|
|
*/ |
|
127
|
|
|
public function getProvincia() |
|
128
|
|
|
{ |
|
129
|
|
|
return $this->provincia; |
|
130
|
|
|
} |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* @param string $provincia |
|
134
|
|
|
* @return Address |
|
135
|
|
|
*/ |
|
136
|
2 |
|
public function setProvincia($provincia) |
|
137
|
|
|
{ |
|
138
|
2 |
|
$this->provincia = $provincia; |
|
139
|
2 |
|
return $this; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
/** |
|
143
|
|
|
* @return string |
|
144
|
|
|
*/ |
|
145
|
|
|
public function getDistrito() |
|
146
|
|
|
{ |
|
147
|
|
|
return $this->distrito; |
|
148
|
|
|
} |
|
149
|
|
|
|
|
150
|
|
|
/** |
|
151
|
|
|
* @param string $distrito |
|
152
|
|
|
* @return Address |
|
153
|
|
|
*/ |
|
154
|
2 |
|
public function setDistrito($distrito) |
|
155
|
|
|
{ |
|
156
|
2 |
|
$this->distrito = $distrito; |
|
157
|
2 |
|
return $this; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
/** |
|
161
|
|
|
* @return string |
|
162
|
|
|
*/ |
|
163
|
|
|
public function getUrbanizacion() |
|
164
|
|
|
{ |
|
165
|
|
|
return $this->urbanizacion; |
|
166
|
|
|
} |
|
167
|
|
|
|
|
168
|
|
|
/** |
|
169
|
|
|
* @param string $urbanizacion |
|
170
|
|
|
* @return Address |
|
171
|
|
|
*/ |
|
172
|
|
|
public function setUrbanizacion($urbanizacion) |
|
173
|
|
|
{ |
|
174
|
|
|
$this->urbanizacion = $urbanizacion; |
|
175
|
|
|
return $this; |
|
176
|
|
|
} |
|
177
|
|
|
|
|
178
|
|
|
/** |
|
179
|
|
|
* @return string |
|
180
|
|
|
*/ |
|
181
|
|
|
public function getDireccion() |
|
182
|
|
|
{ |
|
183
|
|
|
return $this->direccion; |
|
184
|
|
|
} |
|
185
|
|
|
|
|
186
|
|
|
/** |
|
187
|
|
|
* @param string $direccion |
|
188
|
|
|
* @return Address |
|
189
|
|
|
*/ |
|
190
|
2 |
|
public function setDireccion($direccion) |
|
191
|
|
|
{ |
|
192
|
2 |
|
$this->direccion = $direccion; |
|
193
|
2 |
|
return $this; |
|
194
|
|
|
} |
|
195
|
|
|
} |