[#2518] Scripts de migration du RH en PHP vers le nouveau système RH
[auf_rh_dae.git] / project / legacy / models.py
1 from django.db import models
2
3 class Classement(models.Model):
4 id_classement = models.IntegerField(primary_key=True)
5 type_classement = models.CharField(max_length=4)
6 echelon = models.CharField(max_length=127)
7 degre = models.CharField(max_length=32)
8 commentaire = models.CharField(max_length=127)
9 coefficient = models.FloatField()
10 date_modif = models.CharField(max_length=10)
11 actif = models.IntegerField()
12 class Meta:
13 db_table = u'classement'
14 managed = False
15
16 class Fiches(models.Model):
17 no_employe = models.IntegerField(primary_key=True)
18 nom = models.CharField(max_length=128)
19 prenom = models.CharField(max_length=128)
20 date_ouverture = models.CharField(max_length=10)
21 situation_famille = models.CharField(max_length=2)
22 nationalite = models.CharField(max_length=2)
23 tel_domicile = models.CharField(max_length=20)
24 tel_cellulaire = models.CharField(max_length=20)
25 no_rue = models.CharField(max_length=128)
26 ville = models.CharField(max_length=128)
27 etat_province = models.CharField(max_length=128)
28 code_postal_cedex = models.CharField(max_length=64)
29 pays_iso2 = models.CharField(max_length=2)
30 sexe = models.CharField(max_length=1)
31 date_entree = models.CharField(max_length=10)
32 remarque = models.TextField()
33 date_maj = models.CharField(max_length=10)
34 date_naissance = models.CharField(max_length=10)
35 class Meta:
36 db_table = u'fiches'
37 managed = False
38
39 class Dossiers(models.Model):
40 id_dossier = models.IntegerField(primary_key=True)
41 no_dossier = models.CharField(max_length=10)
42 employe = models.ForeignKey(Fiches, related_name='dossiers', db_column='no_employe')
43 id_implantation_1 = models.SmallIntegerField()
44 poste_1 = models.SmallIntegerField()
45 complement_1 = models.CharField(max_length=128)
46 id_implantation_2 = models.SmallIntegerField()
47 poste_2 = models.SmallIntegerField()
48 complement_2 = models.CharField(max_length=128)
49 ids_direction_service = models.CharField(max_length=128)
50 remplacement_de = models.IntegerField()
51 responsable = models.ForeignKey(Fiches, related_name='+', db_column='responsable')
52 id_local_expatrie = models.IntegerField()
53 date_debut_mandat = models.CharField(max_length=10)
54 date_fin_mandat = models.CharField(max_length=10)
55 id_statut = models.IntegerField()
56 id_bstg = models.IntegerField()
57 id_classement = models.IntegerField()
58 id_type_contrat = models.IntegerField()
59 regime_travail = models.SmallIntegerField()
60 date_debut_contrat = models.CharField(max_length=10)
61 date_fin_contrat = models.CharField(max_length=10)
62 remarque = models.TextField()
63 responsable_implantation_1 = models.IntegerField()
64 responsable_implantation_2 = models.IntegerField()
65 class Meta:
66 db_table = u'dossiers'
67 managed = False
68
69 class TypeRemuneration(models.Model):
70 id_type_remuneration = models.IntegerField(primary_key=True)
71 type_remuneration = models.CharField(max_length=127)
72 type_paiement = models.CharField(max_length=127)
73 nature_remuneration = models.CharField(max_length=127)
74 actif = models.IntegerField()
75 class Meta:
76 db_table = u'type_remuneration'
77 managed = False
78
79 class HistoRemuneration(models.Model):
80 id_histo_remuneration = models.IntegerField(primary_key=True)
81 type_remuneration = models.ForeignKey(TypeRemuneration, db_column='id_type_remuneration',
82 related_name='+')
83 no_dossier = models.CharField(max_length=10)
84 montant = models.DecimalField(max_digits=20, decimal_places=4)
85 pourcentage = models.DecimalField(max_digits=20, decimal_places=4)
86 date_effective = models.CharField(max_length=10)
87 id_type_revalorisation = models.IntegerField()
88 code_devise = models.CharField(max_length=3)
89 usager = models.IntegerField()
90 stamp = models.IntegerField()
91 desactive = models.BooleanField()
92 desactive_par = models.IntegerField()
93 annule = models.BooleanField()
94 annule_par = models.IntegerField()
95 stamp_annule = models.IntegerField()
96 stamp_desactive = models.IntegerField()
97 class Meta:
98 db_table = u'histo_remuneration'
99 managed = False
100
101 class FamilleEmploi(models.Model):
102 id_famille_emploi = models.SmallIntegerField(primary_key=True)
103 famille_emploi = models.CharField(max_length=64)
104 actif = models.IntegerField()
105 class Meta:
106 db_table = u'famille_emploi'
107 managed = False
108
109 class DirectionService(models.Model):
110 id_direction_service = models.SmallIntegerField(primary_key=True)
111 direction_service = models.CharField(max_length=256)
112 actif = models.IntegerField()
113 class Meta:
114 db_table = u'direction_service'
115 managed = False
116
117 class Postes(models.Model):
118 id_poste = models.SmallIntegerField(primary_key=True)
119 id_famille_emploi = models.SmallIntegerField()
120 titre_poste_m = models.CharField(max_length=128)
121 titre_poste_f = models.CharField(max_length=128)
122 datemaj = models.CharField(max_length=10)
123 actif = models.CharField(max_length=1)
124 poste_responsable = models.CharField(max_length=1)
125 description = models.CharField(max_length=128)
126 class Meta:
127 db_table = u'postes'
128 managed = False
129
130 class ImplantationPostes(models.Model):
131 id_implantation_postes = models.IntegerField(primary_key=True)
132 id_implantation = models.SmallIntegerField()
133 proportion = models.FloatField()
134 date_maj = models.CharField(max_length=10)
135 actif = models.TextField() # This field type is a guess.
136 type_poste = models.ForeignKey(Postes, db_column='id_poste')
137 class Meta:
138 db_table = u'implantation_postes'
139 managed = False
140
141 class OrganismesBstg(models.Model):
142 id_bstg = models.IntegerField(primary_key=True)
143 organisme_nom = models.CharField(max_length=128)
144 actif = models.IntegerField()
145 bstg_type = models.CharField(max_length=3)
146 class Meta:
147 db_table = u'organismes_bstg'
148 managed = False
149
150 class TauxChangeAnnuel(models.Model):
151 id_taux_change_annuel = models.IntegerField(primary_key=True)
152 code_devise = models.CharField(max_length=3)
153 nom_devise = models.CharField(max_length=32)
154 id_implantation = models.SmallIntegerField()
155 taux_annuel = models.DecimalField(max_digits=100, decimal_places=50)
156 annee = models.CharField(max_length=4)
157 class Meta:
158 db_table = u'taux_change_annuel'
159 managed = False
160
161 class ValeurPoint(models.Model):
162 id_valeur_point = models.IntegerField(primary_key=True)
163 id_implantation = models.SmallIntegerField()
164 valeur_point = models.DecimalField(max_digits=100, decimal_places=50)
165 date_actif = models.CharField(max_length=10)
166 class Meta:
167 db_table = u'valeur_point'
168 managed = False
169
170 class TypeContrat(models.Model):
171 id_type_contrat = models.IntegerField(primary_key=True)
172 nom_contrat = models.CharField(max_length=127)
173 categorie = models.CharField(max_length=1)
174 description_contrat = models.CharField(max_length=127)
175 actif_contrat = models.IntegerField()
176 class Meta:
177 db_table = u'type_contrat'
178 managed = False
179
180 class TypeRevalorisation(models.Model):
181 id_type_revalorisation = models.IntegerField(primary_key=True)
182 type_revalorisation = models.CharField(max_length=127)
183 actif = models.IntegerField()
184 class Meta:
185 db_table = u'type_revalorisation'
186 managed = False
187
188 class Statut(models.Model):
189 id_statut = models.IntegerField(primary_key=True)
190 statut_contractuel = models.CharField(max_length=127)
191 type_contrat = models.CharField(max_length=1)
192 description_statut_contractuel = models.CharField(max_length=127)
193 actif = models.IntegerField()
194 class Meta:
195 db_table = u'statut'
196 managed = False
197
198 class TypeRemuneration(models.Model):
199 id_type_remuneration = models.IntegerField(primary_key=True)
200 type_remuneration = models.CharField(max_length=127)
201 type_paiement = models.CharField(max_length=127)
202 nature_remuneration = models.CharField(max_length=127)
203 actif = models.IntegerField()
204 class Meta:
205 db_table = u'type_remuneration'
206 managed = False
207
208 class AyantDroit(models.Model):
209 id_ayant_droit = models.IntegerField(primary_key=True)
210 no_employe = models.IntegerField()
211 nom_ayant_droit = models.CharField(max_length=128)
212 prenom_ayant_droit = models.CharField(max_length=128)
213 commentaire_ayant_droit = models.CharField(max_length=512)
214 lien_parente = models.CharField(max_length=10)
215 actif = models.IntegerField()
216 class Meta:
217 db_table = u'ayant_droit'
218 managed = False
219