# Generated by Django 3.0.6 on 2020-05-30 14:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('isbn', models.CharField(max_length=20)),
                ('title', models.CharField(max_length=200)),
                ('authors', models.CharField(max_length=200)),
                ('cover_img', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Programme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('field', models.CharField(max_length=50)),
                ('code', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='University',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('city', models.CharField(max_length=50)),
                ('country', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Semester',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('year', models.IntegerField(default=0)),
                ('term', models.IntegerField(default=0)),
                ('programme', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='marketplace.Programme')),
            ],
        ),
        migrations.AddField(
            model_name='programme',
            name='university',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='marketplace.University'),
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('code', models.CharField(max_length=50)),
                ('books', models.ManyToManyField(to='marketplace.Book')),
                ('semesters', models.ManyToManyField(to='marketplace.Semester')),
                ('university', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='marketplace.University')),
            ],
        ),
    ]
