2020-03-28 09:11:49 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2020-03-27 11:16:27 +00:00
|
|
|
from annoying.fields import AutoOneToOneField
|
|
|
|
from django.db import models
|
2020-03-27 16:40:09 +00:00
|
|
|
from byro.common.models.choices import Choices
|
2020-03-27 11:16:27 +00:00
|
|
|
|
|
|
|
class MembershipTypes(Choices):
|
|
|
|
FULL = "Vollmitglied"
|
|
|
|
SUPP = "Fördermitglied"
|
|
|
|
|
|
|
|
class SchaffenProfile(models.Model):
|
|
|
|
member = AutoOneToOneField(
|
|
|
|
to='members.Member',
|
|
|
|
on_delete=models.CASCADE,
|
2020-03-27 16:40:09 +00:00
|
|
|
related_name='profile_schaffen',
|
2020-03-27 11:16:27 +00:00
|
|
|
)
|
|
|
|
membership_type = models.CharField(
|
|
|
|
max_length=MembershipTypes.max_length,
|
2020-03-27 16:40:09 +00:00
|
|
|
verbose_name=("Art der Mitgliedschaft"),
|
2020-03-27 11:16:27 +00:00
|
|
|
choices=MembershipTypes.choices,
|
|
|
|
default=MembershipTypes.FULL,
|
|
|
|
)
|
|
|
|
is_keyholder = models.BooleanField(
|
|
|
|
default=False,
|
2020-03-27 16:40:09 +00:00
|
|
|
verbose_name=("Ist schließberechtigt"),
|
2020-03-27 11:16:27 +00:00
|
|
|
)
|
|
|
|
has_physical_key = models.BooleanField(
|
|
|
|
default=False,
|
2020-03-27 16:40:09 +00:00
|
|
|
verbose_name=("Besitzt physischen Schlüssel"),
|
2020-03-27 11:16:27 +00:00
|
|
|
)
|
2020-03-28 09:11:49 +00:00
|
|
|
is_in_info_channels = models.BooleanField(
|
|
|
|
default=False,
|
|
|
|
verbose_name=("Ist aufgenommen in Infokanäle"),
|
|
|
|
)
|
|
|
|
messenger = models.CharField(
|
|
|
|
max_length=100,
|
|
|
|
verbose_name=("Messenger (Telegram)"),
|
|
|
|
null=True,
|
|
|
|
blank=True
|
|
|
|
)
|
|
|
|
wiki = models.CharField(
|
|
|
|
max_length=100,
|
|
|
|
verbose_name=("Wiki-Benutzername"),
|
|
|
|
null=True,
|
|
|
|
blank=True
|
|
|
|
)
|
|
|
|
schaffen_email = models.EmailField(
|
|
|
|
max_length=100,
|
|
|
|
verbose_name=("Schaffenburg E-Mail-Adresse"),
|
|
|
|
null=True,
|
|
|
|
blank=True
|
|
|
|
)
|
|
|
|
function = models.CharField(
|
|
|
|
max_length=200,
|
|
|
|
verbose_name=("Vereinsfunktion"),
|
|
|
|
null=True,
|
|
|
|
blank=True
|
|
|
|
)
|