# Generated by Django 3.1.13 on 2021-11-12 08:52

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import multiselectfield.db.fields
import timgiasu.core.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ParentRoom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('province_code', models.IntegerField(default=1, validators=[timgiasu.core.validators.min_code_of_location, timgiasu.core.validators.max_code_of_province])),
                ('district_code', models.IntegerField(default=1, validators=[timgiasu.core.validators.min_code_of_location, timgiasu.core.validators.max_code_of_district])),
                ('ward_code', models.IntegerField(blank=True, default=1, null=True, validators=[timgiasu.core.validators.min_code_of_location, timgiasu.core.validators.max_code_of_ward])),
                ('detail_location', models.CharField(blank=True, max_length=500, null=True)),
                ('subject', models.CharField(max_length=200)),
                ('grade_number', models.IntegerField(validators=[timgiasu.core.validators.number_of_grade])),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('day_can_teach', multiselectfield.db.fields.MultiSelectField(choices=[(2, 'Monday'), (3, 'Tuesday'), (4, 'Wednesday'), (5, 'Thursday'), (6, 'Friday'), (7, 'Saturday'), (8, 'Sunday')], max_length=13)),
                ('require', models.TextField(blank=True, null=True)),
                ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, validators=[timgiasu.core.validators.is_parent])),
            ],
            options={
                'ordering': ('-create_at',),
                'permissions': (('change_parentroom_object', 'Change the informations of a parent room'), ('delete_parentroom_object', 'Delete a parent room')),
            },
        ),
        migrations.CreateModel(
            name='WaitingList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('parent_room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='parentroom.parentroom')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-create_at',),
                'permissions': (('delete_waitinglist_object', 'Delete a teacher from a waiting list of a parent room'),),
            },
        ),
        migrations.CreateModel(
            name='TeacherTeaching',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('parent_room', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='parentroom.parentroom')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': (('delete_teacherteaching_object', 'Delete a teacher teaching of a parent room'),),
            },
        ),
        migrations.CreateModel(
            name='Price',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_in_one_day', models.DecimalField(decimal_places=1, max_digits=2)),
                ('money_per_day', models.IntegerField()),
                ('sex_of_teacher', multiselectfield.db.fields.MultiSelectField(choices=[('male', 'Male'), ('female', 'Female')], max_length=11, null=True)),
                ('level_of_teacher', multiselectfield.db.fields.MultiSelectField(choices=[('student', 'Student'), ('teacher', 'Teacher')], max_length=15, null=True)),
                ('parent_room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='parentroom.parentroom')),
            ],
            options={
                'ordering': ('-money_per_day',),
                'permissions': (('change_price_object', 'Change a price of parent room'), ('delete_price_object', 'Delete a price of parent room')),
            },
        ),
        migrations.CreateModel(
            name='InvitedList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('parent_room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='parentroom.parentroom')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-create_at',),
                'permissions': (('delete_invitedlist_object', 'Delete a teacher from a invited list of a parent room'),),
            },
        ),
    ]
