# Generated by Django 3.1.7 on 2021-04-05 14:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('Profile', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('image', models.ImageField(blank=True, null=True, upload_to='post_image/', validators=[django.core.validators.FileExtensionValidator(['png', 'jpg', 'jepg'])])),
                ('updated', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='post_author', to='Profile.profile')),
                ('like_post', models.ManyToManyField(blank=True, null=True, related_name='like_post', to='Profile.profile')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(choices=[('like', 'like'), ('unlike', 'unlike')], max_length=7)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('like_author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='liked_author', to='Profile.profile')),
                ('liked_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='liked_post', to='posts.post')),
            ],
        ),
        migrations.CreateModel(
            name='comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_content', models.TextField()),
                ('image', models.ImageField(blank=True, null=True, upload_to='comment_image/', validators=[django.core.validators.FileExtensionValidator(['jpg', 'png', 'jepg'])])),
                ('updated', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_author', to='Profile.profile')),
                ('commented_post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commented_post', to='posts.post')),
            ],
            options={
                'ordering': ['created'],
            },
        ),
    ]
