byro-schaffenburg/byro_schaffenburg/models.py

29 lines
858 B
Python

from annoying.fields import AutoOneToOneField
from django.db import models
from byro.common.models.choices import Choices
class MembershipTypes(Choices):
FULL = "Vollmitglied"
SUPP = "Fördermitglied"
class SchaffenProfile(models.Model):
member = AutoOneToOneField(
to='members.Member',
on_delete=models.CASCADE,
related_name='profile_schaffen',
)
membership_type = models.CharField(
max_length=MembershipTypes.max_length,
verbose_name=("Art der Mitgliedschaft"),
choices=MembershipTypes.choices,
default=MembershipTypes.FULL,
)
is_keyholder = models.BooleanField(
default=False,
verbose_name=("Ist schließberechtigt"),
)
has_physical_key = models.BooleanField(
default=False,
verbose_name=("Besitzt physischen Schlüssel"),
)