# -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-01-12 15:51
from __future__ import unicode_literals

import datetime
from django.conf import settings
import django.contrib.auth.models
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    replaces = [('hiwi_portal', '0001_initial'), ('hiwi_portal', '0002_auto_20151030_1355'), ('hiwi_portal', '0003_auto_20151030_1829'), ('hiwi_portal', '0004_auto_20151109_1154'), ('hiwi_portal', '0005_auto_20151110_1354'), ('hiwi_portal', '0006_auto_20151110_1511'), ('hiwi_portal', '0007_auto_20151110_1553'), ('hiwi_portal', '0008_worktime_activity'), ('hiwi_portal', '0009_auto_20151110_1609'), ('hiwi_portal', '0010_auto_20151130_1257'), ('hiwi_portal', '0011_contract_vacation'), ('hiwi_portal', '0012_auto_20151201_1035'), ('hiwi_portal', '0013_auto_20151201_1546'), ('hiwi_portal', '0014_auto_20151204_1131'), ('hiwi_portal', '0015_worklog_overwork'), ('hiwi_portal', '0016_user_work_dusted'), ('hiwi_portal', '0017_fillerworkdustactivity_fixedworkdustactivity')]

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Contract',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hours', models.IntegerField()),
                ('payment', models.DecimalField(decimal_places=2, max_digits=6)),
                ('personell', models.CharField(choices=[(b'GF', b'Gro\xc3\x9fforschungsbereich'), (b'UF', b'Universit\xc3\xa4tsbereich')], max_length=2)),
                ('personell_number', models.IntegerField()),
                ('contract_begin', models.DateField(verbose_name=b'Vertragsstart')),
                ('contract_end', models.DateField(verbose_name=b'Vertragsende')),
            ],
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(max_length=200)),
                ('lastname', models.CharField(max_length=200)),
                ('kitaccount', models.CharField(max_length=32, unique=True)),
                ('email', models.CharField(max_length=200)),
                ('private_email', models.CharField(max_length=200, null=True)),
                ('is_active', models.BooleanField(default=True)),
                ('last_login', models.DateTimeField()),
                ('phone_number', models.CharField(blank=True, max_length=15, null=True, validators=[django.core.validators.RegexValidator(message=b"Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex=b'^\\+?1?\\d{9,15}$')])),
            ],
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='WorkLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('printed', models.BooleanField()),
                ('carer_signed', models.BooleanField()),
                ('contract', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hiwi_portal.Contract')),
            ],
        ),
        migrations.CreateModel(
            name='WorkTime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hours', models.IntegerField()),
                ('pause', models.PositiveIntegerField(default=0)),
                ('begin', models.TimeField(verbose_name=b'Start')),
                ('end', models.TimeField(verbose_name=b'Ende')),
                ('work_log', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hiwi_portal.WorkLog')),
                ('activity', models.CharField(default='', max_length=200)),
                ('date', models.DateField(default=datetime.datetime(2015, 11, 10, 16, 9, 45, 573599, tzinfo=utc))),
            ],
        ),
        migrations.CreateModel(
            name='Hiwi',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='hiwi_portal.User')),
            ],
            bases=('hiwi_portal.user',),
        ),
        migrations.CreateModel(
            name='Supervisor',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='hiwi_portal.User')),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hiwi_portal.Department')),
            ],
            bases=('hiwi_portal.user',),
        ),
        migrations.AddField(
            model_name='contract',
            name='department',
            field=models.CharField(max_length=200),
        ),
        migrations.AddField(
            model_name='contract',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='user',
            name='last_login',
            field=models.DateTimeField(null=True),
        ),
        migrations.AddField(
            model_name='user',
            name='notify_to_private',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='user',
            name='private_email',
            field=models.CharField(max_length=200, null=True, validators=[django.core.validators.EmailValidator()]),
        ),
        migrations.AlterField(
            model_name='user',
            name='private_email',
            field=models.CharField(blank=True, max_length=200, null=True, validators=[django.core.validators.EmailValidator()]),
        ),
        migrations.AlterField(
            model_name='contract',
            name='personell',
            field=models.CharField(choices=[(b'GF', b'Gro\xc3\x9fforschungsbereich'), (b'UB', b'Universit\xc3\xa4tsbereich')], max_length=2),
        ),
        migrations.AddField(
            model_name='worklog',
            name='month',
            field=models.IntegerField(default=-1),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='worklog',
            name='year',
            field=models.IntegerField(default=-1),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='worklog',
            name='carer_signed',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='worklog',
            name='printed',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='contract',
            name='vacation',
            field=models.PositiveIntegerField(default=0),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='contract',
            name='personell_number',
            field=models.CharField(max_length=200),
        ),
        migrations.AlterField(
            model_name='contract',
            name='hours',
            field=models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(85)]),
        ),
        migrations.AddField(
            model_name='worklog',
            name='overWork',
            field=models.PositiveIntegerField(default=0),
        ),
        migrations.AddField(
            model_name='user',
            name='work_dusted',
            field=models.BooleanField(default=False),
        ),
        migrations.CreateModel(
            name='FIllerWorkDustActivity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=200)),
                ('avg_length', models.IntegerField()),
                ('contract', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hiwi_portal.Contract')),
            ],
        ),
        migrations.CreateModel(
            name='FixedWorkDustActivity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=200)),
                ('avg_length', models.IntegerField()),
                ('start', models.TimeField(verbose_name=b'Start')),
                ('week_day', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(6)])),
                ('contract', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hiwi_portal.Contract')),
            ],
        ),
    ]
