# Generated by Django 3.1.5 on 2021-01-29 18:35

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import easy_thumbnails.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('shortterm', models.CharField(max_length=128)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
            ],
            options={
                'verbose_name': 'Tätigkeit',
                'verbose_name_plural': 'Tätigkeiten',
            },
        ),
        migrations.CreateModel(
            name='JobGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('shortterm', models.CharField(max_length=128)),
                ('slug', models.SlugField(blank=True, null=True, unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('is_pinned', models.BooleanField(default=False, verbose_name='ANGEHEFTET')),
            ],
            options={
                'verbose_name': 'Tätigkeitsbereich',
                'verbose_name_plural': 'Tätigkeitsbereiche',
            },
        ),
        migrations.CreateModel(
            name='Member',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=128, verbose_name='Vorname')),
                ('surname', models.CharField(max_length=128, verbose_name='Nachname')),
                ('nickname', models.CharField(max_length=128, verbose_name='Spitzname')),
                ('username', models.CharField(blank=True, max_length=128, verbose_name='Benutzername')),
                ('mailaccount', models.CharField(max_length=128, unique=True, verbose_name='Mailadresse')),
                ('role', models.CharField(choices=[('A', 'Active'), ('P', 'Pension')], default='A', max_length=1, verbose_name='Rolle')),
                ('description', models.TextField(blank=True, null=True)),
                ('image', easy_thumbnails.fields.ThumbnailerImageField(upload_to='uploads/members/image/')),
                ('birthday', models.DateField(blank=True, null=True)),
                ('phone', models.CharField(blank=True, max_length=17, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: +999999999'. Up to 15 digits allowed.", regex='^\\+?1?\\d{9,15}$')])),
                ('address', models.TextField(blank=True, null=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'Mitglied',
                'verbose_name_plural': 'Mitglieder',
            },
        ),
        migrations.CreateModel(
            name='JobMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job_start', models.DateField(verbose_name='Job Start')),
                ('job_end', models.DateField(blank=True, null=True, verbose_name='Job Ende')),
                ('job_role', models.CharField(choices=[('10', 'VorsitzendeR'), ('20', 'stv VorsitzendeR'), ('30', '2. stv VorsitzendeR'), ('40', 'VerantwortlicheR'), ('50', 'Mitglied'), ('60', 'Ersatzmitglied')], default='50', max_length=2)),
                ('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.job', verbose_name='Tätigkeit')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.member', verbose_name='Mitglied')),
            ],
        ),
        migrations.AddField(
            model_name='job',
            name='job_group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.jobgroup', verbose_name='Job Gruppe'),
        ),
    ]
