1 | from django.db import models |
---|
2 | |
---|
3 | |
---|
4 | class Pais(models.Model): |
---|
5 | """! |
---|
6 | Clase que contiene los paÃses |
---|
7 | |
---|
8 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
9 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
10 | @date 25-05-2017 |
---|
11 | @version 1.0.0 |
---|
12 | """ |
---|
13 | nombre = models.CharField(max_length=50) |
---|
14 | |
---|
15 | def __str__(self): |
---|
16 | return self.nombre |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | class Estado(models.Model): |
---|
21 | """! |
---|
22 | Clase que contiene los Estados de un Pais |
---|
23 | |
---|
24 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
25 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
26 | @date 25-05-2017 |
---|
27 | @version 1.0.0 |
---|
28 | """ |
---|
29 | nombre = models.CharField(max_length=50) |
---|
30 | pais = models.ForeignKey(Pais) |
---|
31 | |
---|
32 | |
---|
33 | def __str__(self): |
---|
34 | return self.nombre |
---|
35 | |
---|
36 | |
---|
37 | class Municipio(models.Model): |
---|
38 | """! |
---|
39 | Clase que contiene los Municipios de un Estado |
---|
40 | |
---|
41 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
42 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
43 | @date 25-05-2017 |
---|
44 | @version 1.0.0 |
---|
45 | """ |
---|
46 | nombre = models.CharField(max_length=50) |
---|
47 | estado = models.ForeignKey(Estado) |
---|
48 | |
---|
49 | def __str__(self): |
---|
50 | return self.nombre |
---|
51 | |
---|
52 | |
---|
53 | class Parroquia(models.Model): |
---|
54 | """! |
---|
55 | Clase que contiene las parroquias de un Municipio |
---|
56 | |
---|
57 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
58 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
59 | @date 25-05-2017 |
---|
60 | @version 1.0.0 |
---|
61 | """ |
---|
62 | nombre = models.CharField(max_length=50) |
---|
63 | municipio = models.ForeignKey(Municipio) |
---|
64 | |
---|
65 | class Meta: |
---|
66 | ordering = ('nombre',) |
---|
67 | |
---|
68 | def __str__(self): |
---|
69 | return self.nombre |
---|
70 | |
---|
71 | |
---|
72 | class TipoDocumento(models.Model): |
---|
73 | """! |
---|
74 | Clase que contiene el tipo de documento |
---|
75 | |
---|
76 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
77 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
78 | @date 25-05-2017 |
---|
79 | @version 1.0.0 |
---|
80 | """ |
---|
81 | abreviatura = models.CharField(max_length=4, verbose_name='Acrónimo') |
---|
82 | descripcion = models.TextField() |
---|
83 | |
---|
84 | class Meta: |
---|
85 | ordering = ('abreviatura',) |
---|
86 | verbose_name = 'Tipo Documento' |
---|
87 | verbose_name_plural = 'Tipos Documentos' |
---|
88 | |
---|
89 | def __str__(self): |
---|
90 | return self.abreviatura |
---|
91 | |
---|
92 | |
---|
93 | class Institucion(models.Model): |
---|
94 | """! |
---|
95 | Clase que contiene Las instituciones |
---|
96 | |
---|
97 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
98 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
99 | @date 25-05-2017 |
---|
100 | @version 1.0.0 |
---|
101 | """ |
---|
102 | nombre = models.CharField(max_length=255) |
---|
103 | |
---|
104 | class Meta: |
---|
105 | ordering = ('nombre',) |
---|
106 | verbose_name = 'Institucion' |
---|
107 | verbose_name_plural = 'Instituciones' |
---|
108 | |
---|
109 | def __str__(self): |
---|
110 | return self.nombre |
---|
111 | |
---|
112 | |
---|
113 | class TipoCargo(models.Model): |
---|
114 | """! |
---|
115 | Clase que contiene el tipo de cargo del usuario |
---|
116 | |
---|
117 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
118 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
119 | @date 25-05-2017 |
---|
120 | @version 1.0.0 |
---|
121 | """ |
---|
122 | nombre = models.CharField(max_length=120) |
---|
123 | |
---|
124 | class Meta: |
---|
125 | ordering = ('nombre',) |
---|
126 | verbose_name = 'Cargo' |
---|
127 | verbose_name_plural = 'Cargos' |
---|
128 | |
---|
129 | def __str__(self): |
---|
130 | return self.nombre |
---|
131 | |
---|
132 | |
---|
133 | class TipoBien(models.Model): |
---|
134 | """! |
---|
135 | Clase que contiene Los tipos de Bienes |
---|
136 | |
---|
137 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
138 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
139 | @date 20-06-2017 |
---|
140 | @version 1.0.0 |
---|
141 | """ |
---|
142 | tipo = models.CharField(max_length=20) |
---|
143 | descripcion = models.TextField(blank=True) |
---|
144 | |
---|
145 | class Meta: |
---|
146 | ordering = ('tipo',) |
---|
147 | verbose_name = 'Tipo de Bien' |
---|
148 | verbose_name_plural = 'Tipos de Bienes' |
---|
149 | |
---|
150 | def __str__(self): |
---|
151 | return self.tipo |
---|
152 | |
---|
153 | |
---|
154 | class TipoProducto(models.Model): |
---|
155 | """! |
---|
156 | Clase que contiene Los tipos de Productos |
---|
157 | |
---|
158 | @author Ing. Leonel P. Hernandez M. (lhernandez at cenditel.gob.ve) |
---|
159 | @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
160 | @date 20-06-2017 |
---|
161 | @version 1.0.0 |
---|
162 | """ |
---|
163 | tipo = models.CharField(max_length=20) |
---|
164 | descripcion = models.TextField(blank=True) |
---|
165 | |
---|
166 | class Meta: |
---|
167 | ordering = ('tipo',) |
---|
168 | verbose_name = 'Tipo de Producto' |
---|
169 | verbose_name_plural = 'Tipos de Productos' |
---|
170 | |
---|
171 | def __str__(self): |
---|
172 | return self.tipo |
---|