# Generated by Django 2.1.2 on 2018-10-25 18:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0002_auto_20181025_1826'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120, null=True)),
                ('code', models.CharField(max_length=6, null=True)),
                ('students', models.ManyToManyField(related_name='Students', to='accounts.Student')),
            ],
        ),
        migrations.CreateModel(
            name='TeachersTeachCourses',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year', models.IntegerField(null=True)),
                ('semester', models.IntegerField(null=True)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courses.Course')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Teacher')),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='teachers',
            field=models.ManyToManyField(through='courses.TeachersTeachCourses', to='accounts.Teacher'),
        ),
        migrations.AddField(
            model_name='course',
            name='teaching_assistants',
            field=models.ManyToManyField(related_name='TAs', to='accounts.Student'),
        ),
    ]
