Committee model

This commit is contained in:
Elias
2018-03-01 19:28:27 +02:00
parent efe8808e79
commit 780e2d6acb
3 changed files with 37 additions and 7 deletions
+6 -1
View File
@@ -236,6 +236,11 @@ class KaehmyForm(MessageParent):
return self.preset_roles.filter(is_board=True).exists() or self.custom_roles.filter(is_board=True)
class Committee(models.Model):
""" Committee model, has many Roles found under variable roles """
name = models.CharField(max_length=255)
class Role(PresetRole):
"""
Model for Role.
@@ -253,7 +258,7 @@ class Role(PresetRole):
start_date = models.DateField(_('Start date'))
end_date = models.DateField(_('End date'))
official = models.ForeignKey('Official', related_name='roles')
committee = models.ForeignKey('Committee', related_name='roles', on_delete=models.SET_NULL, blank=True)
class Official(User):
"""Model representing a guild official."""