# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2019-08-07 03:04
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Chapter',
            fields=[
                ('id', models.CharField(default=uuid.uuid4, editable=False, max_length=100, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=40)),
                ('chinese_name', models.CharField(blank=True, max_length=40, null=True)),
                ('order', models.CharField(blank=True, max_length=20, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Part',
            fields=[
                ('id', models.CharField(default=uuid.uuid4, editable=False, max_length=100, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=40)),
                ('chinese_name', models.CharField(blank=True, max_length=40, null=True)),
                ('order', models.CharField(blank=True, max_length=20, null=True)),
                ('nodes_list', models.TextField(default='[]', max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Publisher',
            fields=[
                ('id', models.CharField(default=uuid.uuid4, editable=False, max_length=100, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20)),
                ('chinese_name', models.CharField(blank=True, max_length=40, null=True)),
                ('version_name', models.CharField(blank=True, max_length=40, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id', models.CharField(default=uuid.uuid4, editable=False, max_length=100, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=40)),
                ('chinese_name', models.CharField(blank=True, max_length=40, null=True)),
                ('order', models.CharField(blank=True, max_length=20, null=True)),
                ('nodes_list', models.TextField(default='[]', max_length=500)),
                ('chapter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='textbook.Chapter')),
            ],
        ),
        migrations.CreateModel(
            name='Textbook',
            fields=[
                ('id', models.CharField(default=uuid.uuid4, editable=False, max_length=100, primary_key=True, serialize=False)),
                ('subject', models.CharField(blank=True, max_length=20, null=True)),
                ('name', models.CharField(max_length=40)),
                ('chinese_name', models.CharField(blank=True, max_length=40, null=True)),
                ('grade', models.CharField(blank=True, db_index=True, max_length=20, null=True)),
                ('publisher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='textbook.Publisher')),
            ],
        ),
        migrations.AddField(
            model_name='part',
            name='section',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='textbook.Section'),
        ),
        migrations.AddField(
            model_name='chapter',
            name='textbook',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='textbook.Textbook'),
        ),
    ]
