From 66a79e89ea21db314c19878f569191574f962e85 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Wed, 23 Dec 2020 13:26:24 +0100 Subject: [PATCH] office related items in employee modell added --- evapp/migrations/0002_auto_20201223_1223.py | 23 +++++++++++++++++++++ evapp/models.py | 12 +++++++++++ 2 files changed, 35 insertions(+) create mode 100644 evapp/migrations/0002_auto_20201223_1223.py diff --git a/evapp/migrations/0002_auto_20201223_1223.py b/evapp/migrations/0002_auto_20201223_1223.py new file mode 100644 index 0000000..fa838bf --- /dev/null +++ b/evapp/migrations/0002_auto_20201223_1223.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.4 on 2020-12-23 12:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('evapp', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='employee', + name='post_office_box', + field=models.BooleanField(default=True, verbose_name='Postfach am Empfang benötigt?'), + ), + migrations.AddField( + model_name='employee', + name='transponder', + field=models.CharField(choices=[('NORM', 'allgemeiner Transponder'), ('SPECIAL', 'besondere Schließungen (bitte angeben)'), ('NO', 'Kein Transponder')], default='NORM', max_length=7), + ), + ] diff --git a/evapp/models.py b/evapp/models.py index e7433aa..77bb5a5 100644 --- a/evapp/models.py +++ b/evapp/models.py @@ -30,13 +30,19 @@ ACCOUNT_CHOICES = {'OTRSWMDE': 'OTRS (WMDE)', 'FORUM': 'forum.wikimedia.de', } +TRANSPONDER_CHOICES = {'NORM': 'allgemeiner Transponder', + 'SPECIAL': 'besondere Schließungen (bitte angeben)', + 'NO': 'Kein Transponder',} + class Employee(models.Model): + # personal data firstname = models.CharField(max_length=50, verbose_name="Vorname") lastname = models.CharField(max_length=50, verbose_name="Nachname") email = models.CharField(max_length=50, verbose_name="E-Mail-Adresse") department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items()) team = models.CharField(max_length=20, null=True, blank=True) + # general work related stuff 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)") @@ -44,6 +50,7 @@ class Employee(models.Model): desk = models.CharField(max_length=100, null=True, verbose_name="Wo soll der Arbeitsplatz sein?") # TODO: we need an optional question for remote work here + # IT related stuff laptop = models.CharField(max_length=2, choices=LAPTOP_CHOICES.items(), default='14') 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.') @@ -53,3 +60,8 @@ class Employee(models.Model): 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) + + # 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?')