1 | from django.db import models
|
---|
2 |
|
---|
3 |
|
---|
4 | class Kostenstelle(models.Model):
|
---|
5 | # id = models.AutoField(primary_key=True)
|
---|
6 | id = models.IntegerField(primary_key=True, help_text="...")
|
---|
7 | parent = models.ForeignKey('self', models.PROTECT, null=True, blank=True)
|
---|
8 | name = models.CharField(max_length=60, blank=True)
|
---|
9 |
|
---|
10 | class Meta:
|
---|
11 | db_table = 'kostenstelle'
|
---|
12 |
|
---|
13 |
|
---|
14 | class KalenderEintrag(models.Model):
|
---|
15 | id = models.AutoField(primary_key=True)
|
---|
16 | von = models.DateField(verbose_name="\u200Bvon")
|
---|
17 | bis = models.DateField(verbose_name="\u200Bbis")
|
---|
18 | kst = models.ManyToManyField(Kostenstelle, blank=True)
|
---|