# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-06-27 10:36
from __future__ import unicode_literals

import cloudinary.models
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256, verbose_name='Title')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('created_datetime', models.DateTimeField(blank=True, default=datetime.datetime.now, verbose_name='Created data and time')),
                ('created_by', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Author')),
            ],
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256, verbose_name='Title')),
                ('sort_index', models.IntegerField(verbose_name='Sort index')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('created_datetime', models.DateTimeField(blank=True, default=datetime.datetime.now, verbose_name='Created data and time')),
                ('pdf_file', cloudinary.models.CloudinaryField(max_length=255, null=True, verbose_name='PDF file')),
                ('pages_ready', models.BooleanField(default=False, verbose_name='Page status')),
                ('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app_core.Course', verbose_name='Course')),
                ('created_by', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Author')),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image_file_reference', models.CharField(max_length=256, verbose_name='Reference to image')),
                ('page_number', models.IntegerField(verbose_name='Number of page')),
                ('module', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app_core.Module')),
            ],
        ),
        migrations.CreateModel(
            name='StudentPageHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app_core.Page', verbose_name='Last page')),
                ('module', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app_core.Module')),
                ('student', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Studet')),
            ],
        ),
        migrations.CreateModel(
            name='StudentPageNote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_datetime', models.DateTimeField(blank=True, default=datetime.datetime.now, verbose_name='Created data and time')),
                ('note', models.TextField(null=True, verbose_name='Note')),
                ('page', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='app_core.Page', verbose_name='Page')),
                ('student', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Studet')),
            ],
        ),
    ]
