# Generated by Django 2.2.10 on 2020-11-03 16:09

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('polls', '0003_auto_20201103_1819'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='choice',
            options={'verbose_name': 'Вариант ответа', 'verbose_name_plural': 'Варианты ответа'},
        ),
        migrations.AddField(
            model_name='choice',
            name='question',
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='choices', to='polls.Question', verbose_name='варианты ответа'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='choice',
            name='text',
            field=models.CharField(default=None, max_length=200, verbose_name='ответ'),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='Answer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_id', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)], verbose_name='id пользователя')),
                ('choice', models.ManyToManyField(related_name='answers', to='polls.Choice')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='polls.Question', verbose_name='вопрос')),
            ],
            options={
                'verbose_name': 'Ответ пользователя на вопрос',
                'verbose_name_plural': 'Ответы пользователя на вопрос',
            },
        ),
    ]
