# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-03-11 14:48
from __future__ import unicode_literals

import ckeditor_uploader.fields
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='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', ckeditor_uploader.fields.RichTextUploadingField(max_length=1000, verbose_name='题目')),
                ('category', models.CharField(choices=[('math', '数学'), ('english', '英语'), ('politic', '政治'), ('major', '专业课')], max_length=10, verbose_name='分类')),
                ('answer', ckeditor_uploader.fields.RichTextUploadingField(default='', max_length=1000, verbose_name='答案')),
                ('note', ckeditor_uploader.fields.RichTextUploadingField(default='', max_length=1000, verbose_name='笔记')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('modified_time', models.DateTimeField(auto_now=True, verbose_name='最后修改时间')),
            ],
            options={
                'verbose_name': '错题整理',
                'verbose_name_plural': '错题整理',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=20, verbose_name='标签')),
            ],
            options={
                'verbose_name': '标签',
                'verbose_name_plural': '标签',
            },
        ),
        migrations.AddField(
            model_name='question',
            name='tags',
            field=models.ManyToManyField(to='main_platform.Tag', verbose_name='标签'),
        ),
        migrations.AddField(
            model_name='question',
            name='user_belong',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='所属用户'),
        ),
    ]
