EVA/evapp/models.py

78 lines
4.0 KiB
Python
Raw Normal View History

2020-12-23 10:42:57 +00:00
from django.db import models
2020-12-23 12:16:01 +00:00
from multiselectfield import MultiSelectField
2020-12-23 10:42:57 +00:00
2021-01-14 14:10:29 +00:00
# ATTENTION!!!
# No key should be used twice in any of these dicts because of the
# implementation in views.EvaFormView.beautify_data()
#
2020-12-23 11:04:08 +00:00
DEPARTMENT_CHOICES = {'PROG': 'Programme',
'SOFT': 'Softwareentwicklung',
'CENT': 'Central',
'VOR': 'Vorstand',}
2020-12-23 12:16:01 +00:00
LAPTOP_CHOICES = {'14': '14", unser Standardgerät',
'12': '12,5", geeignet für Vielreisende',}
2021-02-08 13:46:38 +00:00
VENDOR_CHOICES = {'STANDARD': 'Dell Latitude',
'LENOVO': 'Lenovo Thinkpad',
'MAC': 'Mac (nur in Ausnahmefällen)'}
2020-12-23 12:16:01 +00:00
OS_CHOICES = {'UBU': 'Ubuntu (Standard)',
'WIN': 'Windows (bitte Begründung angeben)',}
MOBILE_CHOICES = {'NO': 'Kein Mobiltelefon',
'SIMPLE': 'Einfaches Gerät für Erreichbarkeit',
'SINGLE': 'Smartphone, Single SIM',
'DUAL': 'Smartphone, Dual SIM',}
LANG_CHOICES = {'GER': 'deutsch',
'ENG': 'english',}
2021-02-09 09:48:07 +00:00
ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS Ticketsystem',
2020-12-23 12:16:01 +00:00
'CIVIC1': 'Civic CRM (allgemein)',
'CIVIC2': "Civic CRM (Mailings, impliziert allgemein)",
2021-02-09 09:48:07 +00:00
'ZEDA': "Zeda Nextcloud",
2020-12-23 12:16:01 +00:00
'WEB': 'www.wikimedia.de (edit)',
'BLOG': 'blog.wikimedia.de (edit)',
'FORUM': 'forum.wikimedia.de',
}
TRANSPONDER_CHOICES = {'NORM': 'allgemeiner Transponder',
'SPECIAL': 'besondere Schließungen (bitte angeben)',
2021-01-14 14:10:29 +00:00
'NOTRANS': 'Kein Transponder',}
2020-12-23 11:04:08 +00:00
class Employee(models.Model):
# personal data
2020-12-23 11:04:08 +00:00
firstname = models.CharField(max_length=50, verbose_name="Vorname")
lastname = models.CharField(max_length=50, verbose_name="Nachname")
2021-02-08 11:19:54 +00:00
intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True)
2020-12-23 11:04:08 +00:00
email = models.CharField(max_length=50, verbose_name="E-Mail-Adresse")
department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items())
2021-02-09 09:48:07 +00:00
team = models.CharField(max_length=20, null=True, blank=True) # TODO? choices?
2020-12-23 11:17:50 +00:00
# general work related stuff
2020-12-23 11:17:50 +00:00
firstdate_employment = models.DateField(null=True, verbose_name="erster Arbeitstag")
firstdate_presence = models.DateField(null=True, verbose_name="erster Tag der Anwesenheit in der Geschäftsstelle")
jobdescription_german = models.CharField(null=True, max_length=100, verbose_name="Stellenbeschreibung(deutsch)")
jobdescription_english = models.CharField(null=True, max_length=100, verbose_name="job description(english)")
remote = models.BooleanField(verbose_name='Braucht keinen Arbeitsplatz weil Home-Office', default=False)
desk = models.CharField(max_length=100, null=True, blank=True, verbose_name="Wo soll der Arbeitsplatz sein?")
2020-12-23 12:16:01 +00:00
# IT related stuff
2020-12-23 12:16:01 +00:00
laptop = models.CharField(max_length=2, choices=LAPTOP_CHOICES.items(), default='14')
2021-02-08 13:46:38 +00:00
vendor = models.CharField(max_length=8, choices=VENDOR_CHOICES.items(), default='STANDARD')
2020-12-23 12:16:01 +00:00
os = models.CharField(max_length=3, choices=OS_CHOICES.items(), default='UBU')
screen = models.BooleanField(default=False, verbose_name='zusätzlicher Monitor? Einer ist standard.')
mobile = models.CharField(max_length=6, default='NO')
landline = models.BooleanField(default=True, verbose_name="Festnetztelefon")
comment = models.TextField(max_length=500, null=True, blank=True, verbose_name="zusätzliche IT-Anforderungen")
language = models.CharField(max_length=3, choices=LANG_CHOICES.items(), default="GER")
accounts = MultiSelectField(choices=ACCOUNT_CHOICES.items(), null=True)
lists = models.CharField(max_length=100, null=True)
2021-02-08 14:51:39 +00:00
rebu2go = models.BooleanField(verbose_name="Rebu2Go-Zugang benötigt?", default=False)
# office related stuff
transponder = models.CharField(max_length=7, choices=TRANSPONDER_CHOICES.items(), default='NORM')
# TODO: we need an optional field here for SPECIAL
post_office_box = models.BooleanField(default=True, verbose_name='Postfach am Empfang benötigt?')