# Generated by Django 3.1.7 on 2021-03-12 19:00

import apps.django.utils.fields.color
from django.db import migrations, models
import django.db.models.deletion
import django_common_utils.libraries.handlers.models
import django_lifecycle.mixins


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.CharField(editable=False, help_text='An unique ID for the object', max_length=127, primary_key=True, serialize=False, unique=True, verbose_name='ID')),
                ('course_number', models.PositiveSmallIntegerField(default=1, verbose_name='Kursnummer')),
            ],
            options={
                'verbose_name': 'Kurs',
                'verbose_name_plural': 'Kurse',
                'ordering': ('subject', 'teacher', 'course_number'),
            },
            bases=(django_lifecycle.mixins.LifecycleModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('id', models.CharField(editable=False, help_text='An unique ID for the object', max_length=127, primary_key=True, serialize=False, unique=True, verbose_name='ID')),
                ('place', models.CharField(max_length=15, unique=True, verbose_name='Ort')),
            ],
            options={
                'verbose_name': 'Raum',
                'verbose_name_plural': 'Räume',
                'ordering': ('place',),
            },
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.CharField(editable=False, help_text='An unique ID for the object', max_length=127, primary_key=True, serialize=False, unique=True, verbose_name='ID')),
                ('name', models.CharField(max_length=31, verbose_name='Name')),
                ('short_name', models.CharField(max_length=7, verbose_name='Kurzer Name')),
            ],
            options={
                'verbose_name': 'Fach',
                'verbose_name_plural': 'Fächer',
                'ordering': ('name',),
            },
            bases=(django_lifecycle.mixins.LifecycleModelMixin, models.Model, django_common_utils.libraries.handlers.models.HandlerMixin),
        ),
        migrations.CreateModel(
            name='UserSubjectRelation',
            fields=[
                ('id', models.CharField(editable=False, help_text='An unique ID for the object', max_length=127, primary_key=True, serialize=False, unique=True, verbose_name='ID')),
                ('color', apps.django.utils.fields.color.ColorField(max_length=11, verbose_name='Farbe')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.subject', verbose_name='Fach')),
            ],
            options={
                'verbose_name': 'Fach-Benutzer-Beziehung',
                'verbose_name_plural': 'Fach-Benutzer-Beziehungen',
                'ordering': ('subject', 'user'),
            },
            bases=(django_lifecycle.mixins.LifecycleModelMixin, models.Model),
        ),
    ]
