# Generated by Django 3.1.7 on 2021-03-03 15:28

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='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_name', models.CharField(max_length=200, verbose_name='имя отправителя')),
                ('email', models.CharField(max_length=200, verbose_name='email')),
                ('message_text', models.TextField(verbose_name='текст сообщения')),
                ('send_date', models.DateTimeField(verbose_name='дата отправления')),
            ],
        ),
        migrations.CreateModel(
            name='Task_theme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('theme_name', models.CharField(max_length=50, verbose_name='тема задания')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_title', models.CharField(max_length=200, verbose_name='название задания')),
                ('task_text', models.TextField(verbose_name='текст задания')),
                ('correct_solution', models.TextField(verbose_name='текст задания')),
                ('pub_date', models.DateTimeField(verbose_name='дата публикации')),
                ('theme_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.task_theme')),
            ],
        ),
        migrations.CreateModel(
            name='Solution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('correct', models.SmallIntegerField(default=0, verbose_name='правильность решения')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.task')),
                ('user_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Search',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('search_text', models.CharField(max_length=200, verbose_name='текст запроса')),
                ('search_date', models.DateTimeField(verbose_name='дата запроса')),
                ('user_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='search_set', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_text', models.CharField(max_length=200, verbose_name='текст комментария')),
                ('comment_pub_date', models.DateTimeField(verbose_name='дата публикации')),
                ('author_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.task')),
            ],
        ),
    ]
