# Generated by Django 3.0.3 on 2020-03-08 12:18

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Questioncat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('name', models.CharField(max_length=200, unique=True, verbose_name='名称')),
                ('pid', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='question.Questioncat', verbose_name='父')),
            ],
            options={
                'verbose_name': '题库类别',
                'verbose_name_plural': '题库类别',
            },
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('name', models.TextField(verbose_name='题干')),
                ('type', models.IntegerField(choices=[(1, '单选'), (2, '多选'), (3, '判断')], default=1, verbose_name='题型')),
                ('level', models.IntegerField(choices=[(1, '低'), (2, '中'), (3, '高')], default=1, verbose_name='难度')),
                ('answer', django.contrib.postgres.fields.jsonb.JSONField()),
                ('right', django.contrib.postgres.fields.jsonb.JSONField()),
                ('resolution', models.TextField(verbose_name='解析')),
                ('questioncat', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='question.Questioncat', verbose_name='所属题库')),
            ],
            options={
                'verbose_name': '题目',
                'verbose_name_plural': '题目',
            },
        ),
    ]
