# Generated by Django 2.2.5 on 2020-02-06 11:05

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),
        ('accounts', '0022_auto_20200206_1105'),
        ('posts', '0023_auto_20191226_0707'),
    ]

    operations = [
        migrations.CreateModel(
            name='PostFlagReasons',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='FlagPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('flaged_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='flaged_post_user', to=settings.AUTH_USER_MODEL)),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='flaged_post', to='posts.Post')),
                ('reason', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='flaged_post_reason', to='accounts.ProfileFlagReasons')),
            ],
            options={
                'unique_together': {('post', 'flaged_by')},
            },
        ),
    ]
