Ticket #12599: models.py

File models.py, 1.8 KB (added by handelaar, 5 years ago)
Line 
1# coding=utf8
2
3# This is an auto-generated Django model module.
4# You'll have to do the following manually to clean this up:
5#     * Rearrange models' order
6#     * Make sure each model has one field with primary_key=True
7# Feel free to rename the models, but don't rename db_table values or field names.
8#
9# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]'
10# into your database.
11
12from django.db import models
13from django.utils.translation import ugettext_lazy as _
14
15class Person(models.Model):
16    name = models.CharField(max_length=512)
17    class Meta:
18        verbose_name = _("Person")
19        verbose_name_plural = _("People")
20    def __unicode__(self):
21        return self.name
22
23class Expense(models.Model):
24    year = models.DateField()
25    person = models.ForeignKey(Person)
26    salary = models.FloatField()
27    allowance = models.FloatField()
28    cta = models.FloatField()
29    mea = models.FloatField()
30    consphone = models.FloatField()
31    officegrant = models.FloatField()
32    office = models.FloatField()
33    ssa = models.FloatField()
34    mobile = models.FloatField()
35    travel = models.FloatField()
36    committeetravel = models.FloatField()
37    isdn = models.FloatField()
38    trainingtravel = models.FloatField()
39    cttee_ent = models.FloatField()
40    ipu = models.FloatField()
41    bpa = models.FloatField()
42
43class Moffice(models.Model):
44    moffice_id = models.IntegerField(primary_key=True,db_column='moffice_id')
45    dept = models.CharField(max_length=765,blank=True)
46    position = models.CharField(max_length=600)
47    from_date = models.DateField()
48    to_date = models.DateField()
49    person = models.ForeignKey(Person,db_column='person')
50    source = models.CharField(max_length=765,blank=True)
51    class Meta:
52        db_table = u'moffice'
53        verbose_name = _("Ministerial position")
54
Back to Top