# Generated by Django 3.1.3 on 2020-12-11 17:35

import django.db.models.deletion
import django_lifecycle.mixins
from django.conf import settings
from django.db import migrations, models

from common import json_encoder


class Migration(migrations.Migration):

    dependencies = [
        ('game', '0004_add_vk_fields_to_appuser'),
    ]

    operations = [
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('points', models.PositiveIntegerField(default=0)),
                ('created_at', models.DateTimeField(editable=False)),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
            bases=(django_lifecycle.mixins.LifecycleModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_word', models.CharField(max_length=50)),
                ('answer_words', models.JSONField(default=list, encoder=json_encoder.UnicodeJSONEncoder)),
                ('correct_answer', models.CharField(max_length=50)),
                ('selected_answer', models.CharField(blank=True, default='', max_length=50)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='game.game')),
            ],
            options={
                'abstract': False,
            },
            bases=(django_lifecycle.mixins.LifecycleModelMixin, models.Model),
        ),
    ]
