# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-07-12 20:29
from __future__ import unicode_literals

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(primary_key=True, serialize=False)),
                ('name', models.TextField(default=b'Undefined', null=True)),
                ('description', models.TextField(null=True)),
                ('closed', models.BooleanField(default=False)),
                ('subscrNumber', models.IntegerField(default=False)),
                ('startDate', models.DateTimeField(null=True)),
                ('endDate', models.DateTimeField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='CourseCatalog',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.TextField(default=b'Course Catalog', null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CourseState',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.TextField(default=b'Undefined', null=True, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='RepeatedLesson',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('weekDay', models.IntegerField(null=True)),
                ('startDate', models.DateField(null=True)),
                ('endDate', models.DateField(null=True)),
                ('startTime', models.TimeField(null=True)),
                ('endTime', models.TimeField(null=True)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='RepeatedLessons', to='course.Course')),
            ],
        ),
        migrations.CreateModel(
            name='RepeatedLessonFactory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SingleLesson',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField(null=True)),
                ('startTime', models.TimeField(null=True)),
                ('endTime', models.TimeField(null=True)),
                ('course', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='single_lessons', to='course.Course')),
                ('repeatedlesson', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='single_lessons', to='course.RepeatedLesson')),
            ],
        ),
        migrations.CreateModel(
            name='SingleLessonFactory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ActivatedCourse',
            fields=[
                ('coursestate_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='course.CourseState')),
            ],
            bases=('course.coursestate',),
        ),
        migrations.CreateModel(
            name='DeactivatedCourse',
            fields=[
                ('coursestate_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='course.CourseState')),
            ],
            bases=('course.coursestate',),
        ),
        migrations.CreateModel(
            name='IncompleteCourse',
            fields=[
                ('coursestate_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='course.CourseState')),
            ],
            bases=('course.coursestate',),
        ),
        migrations.CreateModel(
            name='TrashedCourse',
            fields=[
                ('coursestate_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='course.CourseState')),
            ],
            bases=('course.coursestate',),
        ),
        migrations.AddField(
            model_name='course',
            name='coursecatalog',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='courses', to='course.CourseCatalog'),
        ),
        migrations.AddField(
            model_name='course',
            name='state',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='courses', to='course.CourseState', to_field=b'name'),
        ),
    ]
