# Generated by Django 3.1 on 2020-09-08 04:18

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('subject', '0011_auto_20200903_1631'),
        ('teacher', '0005_auto_20200906_1823'),
        ('routine', '0004_auto_20200907_1834'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='routine',
            options={'ordering': ('start_time',)},
        ),
        migrations.RemoveField(
            model_name='routine',
            name='class_id',
        ),
        migrations.RemoveField(
            model_name='routine',
            name='day',
        ),
        migrations.AddField(
            model_name='routine',
            name='created_at',
            field=models.DateField(default=django.utils.timezone.now),
        ),
        migrations.AlterField(
            model_name='routine',
            name='end_time',
            field=models.TimeField(default=django.utils.timezone.now),
        ),
        migrations.AlterField(
            model_name='routine',
            name='start_time',
            field=models.TimeField(default=django.utils.timezone.now),
        ),
        migrations.AlterField(
            model_name='routine',
            name='subject',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='subject.subject'),
        ),
        migrations.AlterField(
            model_name='routine',
            name='teacher',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='teacher.teacher'),
        ),
        migrations.CreateModel(
            name='TimeTable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day', models.CharField(blank=True, choices=[('1', 'Saturday'), ('2', 'Sunday'), ('3', 'Monday'), ('4', 'Tuesday'), ('5', 'Wednesday'), ('6', 'Thursday'), ('7', 'Friday')], max_length=2, null=True)),
                ('created_at', models.DateField(default=django.utils.timezone.now)),
                ('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='subject.class')),
            ],
            options={
                'verbose_name': 'timetable',
                'verbose_name_plural': 'timetables',
            },
        ),
        migrations.AddField(
            model_name='routine',
            name='time_table',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='routine.timetable'),
        ),
    ]
