# Generated by Django 2.0 on 2018-06-29 08:00

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('english', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('username', models.CharField(max_length=150, primary_key=True, serialize=False)),
                ('email', models.EmailField(blank=True, max_length=254, unique=True)),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now)),
                ('is_superuser', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Configuration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(default=150, null=True)),
                ('exam', models.IntegerField(default=20, null=True)),
                ('showChinese', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='LearnRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('iterations', models.IntegerField(default=0)),
                ('time', models.DateField(auto_now_add=True)),
                ('learner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Vocabulary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('category', models.CharField(choices=[('GRE', 'GRE'), ('CET4', '四级'), ('CET6', '六级'), ('TOEFL', '托福'), ('IELTS', '雅思'), ('SELF', '自定义')], max_length=10)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Word',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('word', models.CharField(max_length=64)),
                ('characteristic', models.CharField(choices=[('adj.', 'adjective'), ('adv.', 'adverb'), ('n.', 'noun'), ('v.', 'verb'), ('conj.', 'conjunction'), ('pron.', 'pronoun'), ('num.', 'numeral'), ('art.', 'article'), ('prep.', 'preposition'), ('interj.', 'interjection')], max_length=15)),
                ('symbol', models.CharField(max_length=64)),
                ('chinese', models.TextField()),
                ('sentences', models.TextField(default='')),
                ('books', models.ManyToManyField(related_name='vocab_word', to='english.Vocabulary')),
            ],
        ),
        migrations.AddField(
            model_name='learnrecord',
            name='word',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='english.Word'),
        ),
        migrations.AddField(
            model_name='configuration',
            name='currVocab',
            field=models.ForeignKey(default=3, on_delete=django.db.models.deletion.CASCADE, to='english.Vocabulary'),
        ),
        migrations.AddField(
            model_name='configuration',
            name='userConfig',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
