[57f6191] | 1 | # -*- coding: utf-8 -*- |
---|
| 2 | """! |
---|
| 3 | Modelo que construye el modelo de datos de las utilidades |
---|
| 4 | |
---|
| 5 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 6 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 7 | @date 18-01-2017 |
---|
| 8 | @version 1.0.0 |
---|
| 9 | """ |
---|
| 10 | from django.db import models |
---|
[54f032c] | 11 | from django.contrib.gis.db import models |
---|
[57f6191] | 12 | |
---|
| 13 | |
---|
| 14 | class Pais(models.Model): |
---|
| 15 | """! |
---|
| 16 | Clase que contiene el modelo de datos de Pais |
---|
| 17 | |
---|
| 18 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 19 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 20 | @date 25-05-2017 |
---|
| 21 | @version 1.0.0 |
---|
| 22 | """ |
---|
| 23 | nombre = models.CharField(max_length=50) |
---|
[54f032c] | 24 | location = models.PointField(help_text="Representa (Latitud, Longitud)") |
---|
[57f6191] | 25 | |
---|
| 26 | class Meta: |
---|
| 27 | ordering = ('nombre',) |
---|
| 28 | verbose_name = 'Pais' |
---|
| 29 | verbose_name_plural = 'Paises' |
---|
| 30 | |
---|
| 31 | def __str__(self): |
---|
| 32 | return self.nombre |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | class Estado(models.Model): |
---|
| 37 | """! |
---|
| 38 | Clase que contiene el modelo de datos del Estado |
---|
| 39 | |
---|
| 40 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 41 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 42 | @date 25-05-2017 |
---|
| 43 | @version 1.0.0 |
---|
| 44 | """ |
---|
| 45 | nombre = models.CharField(max_length=50) |
---|
| 46 | pais = models.ForeignKey(Pais) |
---|
[54f032c] | 47 | location = models.PointField(help_text="Representa (Latitud, Longitud)") |
---|
| 48 | |
---|
[57f6191] | 49 | |
---|
| 50 | class Meta: |
---|
| 51 | ordering = ('nombre',) |
---|
| 52 | verbose_name = 'Estado' |
---|
| 53 | verbose_name_plural = 'Estados' |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | def __str__(self): |
---|
| 57 | return self.nombre |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | class Municipio(models.Model): |
---|
| 61 | """! |
---|
| 62 | Clase que contiene el modelo de datos del Municipio |
---|
| 63 | |
---|
| 64 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 65 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 66 | @date 25-05-2017 |
---|
| 67 | @version 1.0.0 |
---|
| 68 | """ |
---|
| 69 | nombre = models.CharField(max_length=50) |
---|
| 70 | estado = models.ForeignKey(Estado) |
---|
[54f032c] | 71 | location = models.PointField(help_text="Representa (Latitud, Longitud)") |
---|
[57f6191] | 72 | |
---|
| 73 | class Meta: |
---|
| 74 | ordering = ('nombre',) |
---|
| 75 | verbose_name = 'Municipio' |
---|
| 76 | verbose_name_plural = 'Municipios' |
---|
| 77 | |
---|
| 78 | def __str__(self): |
---|
| 79 | return self.nombre |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | class Parroquia(models.Model): |
---|
| 83 | """! |
---|
| 84 | Clase que contiene el modelo de datos de la parroquia |
---|
| 85 | |
---|
| 86 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 87 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 88 | @date 25-05-2017 |
---|
| 89 | @version 1.0.0 |
---|
| 90 | """ |
---|
| 91 | nombre = models.CharField(max_length=50) |
---|
| 92 | municipio = models.ForeignKey(Municipio) |
---|
[54f032c] | 93 | location = models.PointField(help_text="Representa (Latitud, Longitud)") |
---|
[57f6191] | 94 | |
---|
| 95 | class Meta: |
---|
| 96 | ordering = ('nombre',) |
---|
| 97 | verbose_name = 'Parroquia' |
---|
| 98 | verbose_name_plural = 'Parroquias' |
---|
| 99 | |
---|
| 100 | def __str__(self): |
---|
| 101 | return self.nombre |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | class TipoDocumento(models.Model): |
---|
| 105 | """! |
---|
| 106 | Clase que contiene el tipo de documento |
---|
| 107 | |
---|
| 108 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 109 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 110 | @date 25-05-2017 |
---|
| 111 | @version 1.0.0 |
---|
| 112 | """ |
---|
| 113 | abreviatura = models.CharField(max_length=4, verbose_name='Acrónimo') |
---|
| 114 | descripcion = models.TextField() |
---|
| 115 | |
---|
| 116 | class Meta: |
---|
| 117 | ordering = ('abreviatura',) |
---|
| 118 | verbose_name = 'Tipo Documento' |
---|
| 119 | verbose_name_plural = 'Tipos Documentos' |
---|
| 120 | |
---|
| 121 | def __str__(self): |
---|
| 122 | return self.abreviatura |
---|
| 123 | |
---|
| 124 | |
---|
| 125 | class Nacionalidad(models.Model): |
---|
| 126 | """! |
---|
| 127 | Clase que contiene el modelo de datos para la Nacionalidad |
---|
| 128 | |
---|
| 129 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 130 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 131 | @date 25-05-2017 |
---|
| 132 | @version 1.0.0 |
---|
| 133 | """ |
---|
| 134 | fk_pais = models.ForeignKey(Pais, verbose_name='Pais') |
---|
| 135 | tipo_nacionalidades = models.CharField(max_length=128) |
---|
[54f032c] | 136 | abreviatura = models.CharField(max_length=3) |
---|
[57f6191] | 137 | |
---|
| 138 | class Meta: |
---|
| 139 | ordering = ('tipo_nacionalidades',) |
---|
| 140 | verbose_name = 'Nacionalidad' |
---|
| 141 | verbose_name_plural = 'Nacionalidades' |
---|
| 142 | |
---|
| 143 | def __str__(self): |
---|
| 144 | return self.tipo_nacionalidades |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | class EstadoCivil(models.Model): |
---|
| 148 | """! |
---|
| 149 | Clase que contiene el modelo de datos para el Estado CIvil |
---|
| 150 | |
---|
| 151 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 152 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 153 | @date 25-05-2017 |
---|
| 154 | @version 1.0.0 |
---|
| 155 | """ |
---|
| 156 | estado_civiles = models.CharField(max_length=50) |
---|
| 157 | |
---|
| 158 | class Meta: |
---|
| 159 | ordering = ('estado_civiles',) |
---|
| 160 | verbose_name = 'Estado Civil' |
---|
| 161 | verbose_name_plural = 'Estado Civil' |
---|
| 162 | |
---|
| 163 | def __str__(self): |
---|
| 164 | return self.estado_civiles |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | class Parentesco(models.Model): |
---|
| 168 | """! |
---|
| 169 | Clase que contiene el modelo de datos para los Parentescos |
---|
| 170 | |
---|
| 171 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 172 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 173 | @date 25-05-2017 |
---|
| 174 | @version 1.0.0 |
---|
| 175 | """ |
---|
| 176 | parentescos = models.CharField(max_length=50) |
---|
| 177 | |
---|
| 178 | class Meta: |
---|
| 179 | ordering = ('parentescos',) |
---|
| 180 | |
---|
| 181 | def __str__(self): |
---|
| 182 | return self.parentescos |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | class TipoEnfermedad(models.Model): |
---|
| 186 | """! |
---|
| 187 | Clase que contiene el modelo de datos para los tipos de Enfermedades |
---|
| 188 | |
---|
| 189 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 190 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 191 | @date 25-05-2017 |
---|
| 192 | @version 1.0.0 |
---|
| 193 | """ |
---|
| 194 | tipo_enfermedades = models.CharField(max_length=500, unique=True) |
---|
| 195 | causa = models.TextField() |
---|
| 196 | activa = models.BooleanField(default=True) |
---|
| 197 | |
---|
| 198 | class Meta: |
---|
| 199 | ordering = ('tipo_enfermedades',) |
---|
| 200 | verbose_name = 'Tipo Enfermedad' |
---|
| 201 | verbose_name_plural = 'Tipo Enfermedades' |
---|
| 202 | |
---|
| 203 | def __str__(self): |
---|
| 204 | return self.tipo_enfermedades |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | class TipoTrabajo(models.Model): |
---|
| 208 | """! |
---|
| 209 | Clase que contiene el modelo de datos para los Tipos de Trabajos |
---|
| 210 | |
---|
| 211 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 212 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 213 | @date 25-05-2017 |
---|
| 214 | @version 1.0.0 |
---|
| 215 | """ |
---|
| 216 | tipo_trabajos = models.CharField(max_length=128, unique=True) |
---|
| 217 | |
---|
| 218 | class Meta: |
---|
| 219 | ordering = ('tipo_trabajos',) |
---|
| 220 | verbose_name = 'Tipo Trabajo' |
---|
| 221 | verbose_name_plural = 'Tipos de Trabajo' |
---|
| 222 | |
---|
| 223 | def __str__(self): |
---|
| 224 | return self.tipo_trabajos |
---|
| 225 | |
---|
| 226 | |
---|
| 227 | class CondicionVivienda(models.Model): |
---|
| 228 | """! |
---|
| 229 | Clase que contiene el modelo de datos para la Condicion de Vivienda |
---|
| 230 | |
---|
| 231 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 232 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 233 | @date 25-05-2017 |
---|
| 234 | @version 1.0.0 |
---|
| 235 | """ |
---|
| 236 | condiciones = models.CharField(max_length=50) |
---|
| 237 | |
---|
| 238 | class Meta: |
---|
| 239 | ordering = ('condiciones',) |
---|
| 240 | verbose_name = 'Condicion de la Vivienda' |
---|
| 241 | verbose_name_plural = 'Condiciones de las Viviendas' |
---|
| 242 | |
---|
| 243 | def __str__(self): |
---|
| 244 | return self.condiciones |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | class EstadoVivienda(models.Model): |
---|
| 248 | """! |
---|
| 249 | Clase que contiene el modelo de datos para el Estado de Vivienda |
---|
| 250 | |
---|
| 251 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 252 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 253 | @date 25-05-2017 |
---|
| 254 | @version 1.0.0 |
---|
| 255 | """ |
---|
| 256 | estado = models.CharField(max_length=50) |
---|
| 257 | |
---|
| 258 | class Meta: |
---|
| 259 | ordering = ('estado',) |
---|
| 260 | verbose_name = 'Estado de la Vivienda' |
---|
| 261 | verbose_name_plural = 'Estados de las Viviendas' |
---|
| 262 | |
---|
| 263 | def __str__(self): |
---|
| 264 | return self.estado |
---|
| 265 | |
---|
| 266 | |
---|
| 267 | class TipoServicio(models.Model): |
---|
| 268 | """! |
---|
| 269 | Clase que contiene el modelo de datos para los Tipos de Servicios |
---|
| 270 | |
---|
| 271 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 272 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 273 | @date 25-05-2017 |
---|
| 274 | @version 1.0.0 |
---|
| 275 | """ |
---|
| 276 | tipos = models.CharField(max_length=50) |
---|
| 277 | |
---|
| 278 | class Meta: |
---|
| 279 | ordering = ('tipos',) |
---|
| 280 | |
---|
| 281 | def __str__(self): |
---|
| 282 | return self.tipos |
---|
| 283 | |
---|
| 284 | |
---|
| 285 | class CalidadServicio(models.Model): |
---|
| 286 | """! |
---|
| 287 | Clase que contiene el modelo de datos para la Calidad de los servicios |
---|
| 288 | |
---|
| 289 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 290 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 291 | @date 25-05-2017 |
---|
| 292 | @version 1.0.0 |
---|
| 293 | """ |
---|
| 294 | estatus = models.CharField(max_length=50) |
---|
| 295 | |
---|
| 296 | class Meta: |
---|
| 297 | ordering = ('estatus',) |
---|
| 298 | verbose_name = 'Calidad del Servicio' |
---|
| 299 | verbose_name_plural = 'Calidad de los Servicios' |
---|
| 300 | |
---|
| 301 | def __str__(self): |
---|
| 302 | return self.estatus |
---|
| 303 | |
---|
| 304 | |
---|
[3b38b3f] | 305 | class UnidadesOrganizacionSocial(models.Model): |
---|
[57f6191] | 306 | """! |
---|
[3b38b3f] | 307 | Clase que contiene el modelo de datos para Las Unidades de la Organizacion Social |
---|
[57f6191] | 308 | |
---|
| 309 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 310 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 311 | @date 25-05-2017 |
---|
| 312 | @version 1.0.0 |
---|
| 313 | """ |
---|
| 314 | tipo = models.CharField(max_length=100) |
---|
| 315 | |
---|
| 316 | class Meta: |
---|
| 317 | ordering = ('tipo',) |
---|
[3b38b3f] | 318 | verbose_name = 'Unidad del la Organizacion Social' |
---|
| 319 | verbose_name_plural = 'Unidades de los Organizaciones Sociales' |
---|
[57f6191] | 320 | |
---|
| 321 | def __str__(self): |
---|
| 322 | return self.tipo |
---|
| 323 | |
---|
| 324 | |
---|
| 325 | class ComiteUnidadEjecutiva(models.Model): |
---|
[54f032c] | 326 | """! |
---|
| 327 | Clase que contiene el modelo de datos para Los Comites de la unidad ejecutiva |
---|
| 328 | |
---|
| 329 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 330 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 331 | @date 25-05-2017 |
---|
| 332 | @version 1.0.0 |
---|
| 333 | """ |
---|
[3b38b3f] | 334 | fk_unidad = models.ForeignKey(UnidadesOrganizacionSocial, verbose_name="Unidad Ejecutiva") |
---|
[57f6191] | 335 | tipo = models.CharField(max_length=100) |
---|
| 336 | |
---|
| 337 | class Meta: |
---|
| 338 | ordering = ('tipo',) |
---|
[3b38b3f] | 339 | verbose_name = 'Comite de la Organizacion Social' |
---|
| 340 | verbose_name_plural = 'Comites de las Organizaciones Sociales' |
---|
[57f6191] | 341 | |
---|
| 342 | def __str__(self): |
---|
| 343 | return self.tipo |
---|
[54f032c] | 344 | |
---|
| 345 | |
---|
| 346 | class TipoOrganizacion(models.Model): |
---|
| 347 | """! |
---|
| 348 | Clase que contiene el modelo de datos Para los tipos de organizaciones |
---|
| 349 | |
---|
| 350 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
| 351 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
| 352 | @date 20-07-2017 |
---|
| 353 | @version 1.0.0 |
---|
| 354 | """ |
---|
| 355 | tipo = models.CharField(max_length=100, unique=True) |
---|
| 356 | abreviatura = models.CharField(max_length=4, unique=True) |
---|
| 357 | descripcion = models.TextField() |
---|
| 358 | |
---|
| 359 | class Meta: |
---|
| 360 | ordering = ('tipo',) |
---|
| 361 | verbose_name = 'Tipo de Organizacion' |
---|
| 362 | verbose_name_plural = 'Tipos de Organizaciones' |
---|
| 363 | |
---|
| 364 | def __str__(self): |
---|
| 365 | return self.tipo |
---|