# Generated by Django 4.2 on 2023-04-24 15:16

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='eMail Adresse')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'Benutzer',
                'verbose_name_plural': 'Benutzer',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Cafe',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', models.CharField(max_length=200, verbose_name='Ort')),
                ('address', models.CharField(max_length=200, verbose_name='Adresse')),
                ('event_date', models.DateField(verbose_name='Datum')),
            ],
            options={
                'verbose_name': 'Repair-Café',
                'verbose_name_plural': 'Repair-Cafés',
            },
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=200, verbose_name='ID')),
                ('device', models.CharField(max_length=200, verbose_name='Art des Geräts')),
                ('manufacturer', models.CharField(max_length=200, verbose_name='Hersteller & Modell/Typ')),
                ('error', models.TextField(verbose_name='Fehlerbeschreibung')),
                ('follow_up', models.BooleanField(verbose_name='Folgetermin')),
                ('device_picture', models.FileField(null=True, upload_to=repapp.models.device_directory_path, verbose_name='Foto vom Gerät')),
                ('type_plate_picture', models.FileField(null=True, upload_to=repapp.models.device_directory_path, verbose_name='Foto vom Typenschild')),
                ('confirmed', models.BooleanField(verbose_name='Bestätigung gesendet?')),
                ('date', models.DateField(default=django.utils.timezone.now, verbose_name='Erstellungsdatum')),
                ('cafe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repapp.cafe', verbose_name='Repair-Café')),
            ],
            options={
                'verbose_name': 'Gerät',
                'verbose_name_plural': 'Geräte',
            },
        ),
        migrations.CreateModel(
            name='Guest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=200, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
                ('phone', models.CharField(max_length=200, verbose_name='Telefonnummer')),
                ('residence', models.CharField(max_length=200, verbose_name='Wohnort')),
                ('mail', models.CharField(max_length=200, verbose_name='eMail')),
            ],
            options={
                'verbose_name': 'Gast',
                'verbose_name_plural': 'Gäste',
            },
        ),
        migrations.CreateModel(
            name='Organisator',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
                ('mail', models.CharField(max_length=200, verbose_name='eMail')),
            ],
            options={
                'verbose_name': 'Organisator',
                'verbose_name_plural': 'Organisatoren',
            },
        ),
        migrations.CreateModel(
            name='Reparateur',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Name')),
                ('mail', models.CharField(max_length=200, verbose_name='eMail')),
            ],
            options={
                'verbose_name': 'Reparateur',
                'verbose_name_plural': 'Reparateure',
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.TextField(verbose_name='Frage')),
                ('answer', models.TextField(verbose_name='Antwort')),
                ('date', models.DateField(default=django.utils.timezone.now, verbose_name='Erstellungsdatum')),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repapp.device', verbose_name='Gerät')),
                ('organisator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='repapp.organisator', verbose_name='Organisator')),
                ('reparateur', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='repapp.reparateur', verbose_name='Reparateur')),
            ],
            options={
                'verbose_name': 'Frage',
                'verbose_name_plural': 'Fragen',
            },
        ),
        migrations.CreateModel(
            name='OneTimeLogin',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('secret', models.CharField(max_length=200, unique=True, verbose_name='secret')),
                ('url', models.CharField(max_length=200, verbose_name='URL')),
                ('created', models.DateField(default=django.utils.timezone.now, verbose_name='Erstellungsdatum')),
                ('login_used', models.BooleanField(default=False, verbose_name='Login benutzt?')),
                ('login_date', models.DateField(null=True, verbose_name='Login Datum')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Benutzer')),
            ],
            options={
                'verbose_name': 'Einmal-Login',
                'verbose_name_plural': 'Einmal-Login',
            },
        ),
        migrations.AddField(
            model_name='device',
            name='guest',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='repapp.guest', verbose_name='Gast'),
        ),
        migrations.CreateModel(
            name='Candidate',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('confirmed', models.BooleanField(verbose_name='bestätigt')),
                ('cafe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repapp.cafe', verbose_name='Repair-Café')),
                ('device', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='repapp.device', verbose_name='Gerät')),
            ],
            options={
                'verbose_name': 'Kandidat',
                'verbose_name_plural': 'Kandidaten',
            },
        ),
        migrations.CreateModel(
            name='Appointment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.TimeField(verbose_name='Zeit')),
                ('confirmed', models.BooleanField(verbose_name='bestätigt')),
                ('cafe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repapp.cafe', verbose_name='Repair-Café')),
                ('device', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='repapp.device', verbose_name='Gerät')),
                ('reparateur', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repapp.reparateur', verbose_name='Reparateur')),
            ],
            options={
                'verbose_name': 'Termin',
                'verbose_name_plural': 'Termine',
            },
        ),
    ]
