# Generated by Django 2.0.5 on 2018-05-23 13:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    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=128)),
                ('course_type', models.CharField(choices=[('full-time', 'Full-Time'), ('part-time', 'Part-Time')], max_length=12)),
                ('degree_type', models.CharField(choices=[('be', 'Bachelor of Engineering'), ('btech', 'Bachelor of Technology')], max_length=32)),
                ('years', models.IntegerField()),
                ('description', models.TextField()),
                ('course_code', models.CharField(max_length=12)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('cover', models.ImageField(blank=True, null=True, upload_to=config.utils.upload_course_cover_path)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('year', models.IntegerField()),
                ('subject_code', models.CharField(blank=True, max_length=128, null=True)),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('cover', models.ImageField(blank=True, null=True, upload_to=config.utils.upload_subject_cover_path)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='universities.Course')),
            ],
        ),
        migrations.CreateModel(
            name='University',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('university_code', models.CharField(max_length=8)),
                ('description', models.TextField()),
                ('founded', models.DateField()),
                ('address', models.TextField()),
                ('phone', models.CharField(max_length=20)),
                ('logo', models.ImageField(blank=True, null=True, upload_to=config.utils.upload_university_logo_path)),
                ('cover', models.ImageField(blank=True, null=True, upload_to=config.utils.upload_university_cover_path)),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='university',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='universities.University'),
        ),
    ]
