# Generated by Django 3.0.4 on 2020-06-21 15:30

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='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title_text', models.CharField(max_length=100, verbose_name='Название поста')),
                ('text', models.TextField(verbose_name='Содержание поста')),
                ('pub_date', models.DateTimeField(verbose_name='Время и дата публикации')),
                ('photo', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d/', verbose_name='Фото')),
                ('thumbnumber', models.IntegerField(default=1, help_text='Начинается с 1', verbose_name='Количество лайков')),
                ('author_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Автор')),
                ('likedone', models.ManyToManyField(related_name='users_post_main', to=settings.AUTH_USER_MODEL, verbose_name='Оценивший пользователь')),
            ],
            options={
                'verbose_name': 'Публикация',
                'verbose_name_plural': 'Публикации',
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author', models.CharField(max_length=20, verbose_name='Имя автора')),
                ('text_comment', models.CharField(max_length=200, verbose_name='Текст комментария')),
                ('posts', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wall.Post')),
            ],
            options={
                'verbose_name': 'Комментарий',
                'verbose_name_plural': 'Комментарии',
            },
        ),
    ]
