# Generated by Django 3.2.4 on 2021-06-22 21:15

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('registration', '0003_alter_customers_avatar'),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField(verbose_name='название')),
                ('description', models.TextField(verbose_name='краткое описание')),
                ('event_img', models.ImageField(blank=True, upload_to='C:/media/event_images', verbose_name='изображение для события')),
                ('event_datetime', models.DateTimeField(auto_now_add=True)),
                ('creator_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creator_id', to=settings.AUTH_USER_MODEL)),
                ('event_comments', models.ManyToManyField(blank=True, default=None, related_name='event_comments', to=settings.AUTH_USER_MODEL)),
                ('going_to_event', models.ManyToManyField(blank=True, default=None, related_name='going_to_event', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Событие',
                'verbose_name_plural': 'События',
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('news_name', models.CharField(max_length=200, verbose_name='Заголовок')),
                ('news_text', models.TextField(verbose_name='Текст новости')),
                ('pub_date', models.DateTimeField(verbose_name='Дата публикации')),
            ],
            options={
                'verbose_name': 'Новость',
                'verbose_name_plural': 'Новости',
            },
        ),
        migrations.CreateModel(
            name='GoingToEvent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(choices=[('Иду', 'Иду'), ('Не иду', 'Не иду')], default='Иду', max_length=10)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registration.event')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registration.customers')),
            ],
            options={
                'verbose_name': 'Идущий на событие',
                'verbose_name_plural': 'Идущие на события',
            },
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_text', models.TextField(verbose_name='Текст комментария')),
                ('comment_date', models.DateTimeField(auto_now_add=True)),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments_event', to='registration.event')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='registration.customers')),
            ],
            options={
                'verbose_name': 'Комментарий',
                'verbose_name_plural': 'Комментарии',
            },
        ),
    ]

# Generated by Django 3.2.4 on 2021-06-22 21:15

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('registration', '0003_alter_customers_avatar'),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField(verbose_name='название')),
                ('description', models.TextField(verbose_name='краткое описание')),
                ('event_img', models.ImageField(blank=True, upload_to='C:/media/event_images', verbose_name='изображение для события')),
                ('event_datetime', models.DateTimeField(auto_now_add=True)),
                ('creator_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='creator_id', to=settings.AUTH_USER_MODEL)),
                ('event_comments', models.ManyToManyField(blank=True, default=None, related_name='event_comments', to=settings.AUTH_USER_MODEL)),
                ('going_to_event', models.ManyToManyField(blank=True, default=None, related_name='going_to_event', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Событие',
                'verbose_name_plural': 'События',
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('news_name', models.CharField(max_length=200, verbose_name='Заголовок')),
                ('news_text', models.TextField(verbose_name='Текст новости')),
                ('pub_date', models.DateTimeField(verbose_name='Дата публикации')),
            ],
            options={
                'verbose_name': 'Новость',
                'verbose_name_plural': 'Новости',
            },
        ),
        migrations.CreateModel(
            name='GoingToEvent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(choices=[('Иду', 'Иду'), ('Не иду', 'Не иду')], default='Иду', max_length=10)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registration.event')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registration.customers')),
            ],
            options={
                'verbose_name': 'Идущий на событие',
                'verbose_name_plural': 'Идущие на события',
            },
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_text', models.TextField(verbose_name='Текст комментария')),
                ('comment_date', models.DateTimeField(auto_now_add=True)),
                ('event', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments_event', to='registration.event')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='registration.customers')),
            ],
            options={
                'verbose_name': 'Комментарий',
                'verbose_name_plural': 'Комментарии',
            },
        ),
    ]

# Generated by Django 3.2.4 on 2021-06-22 21:15