# Generated by Django 3.0.2 on 2021-03-30 14:21

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='interaction',
            fields=[
                ('interactionID', models.AutoField(primary_key=True, serialize=False)),
                ('response_type', models.CharField(choices=[('Like', 'Like'), ('Dislike', 'Dislike'), ('Comments', 'Comments')], max_length=100)),
                ('comments', models.CharField(max_length=600)),
                ('interacTimestamp', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='person',
            fields=[
                ('personID', models.AutoField(primary_key=True, serialize=False)),
                ('personName', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='post',
            fields=[
                ('postID', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=100, null=True)),
                ('politics', models.BooleanField()),
                ('health', models.BooleanField()),
                ('sports', models.BooleanField()),
                ('tech', models.BooleanField()),
                ('message', models.CharField(max_length=240)),
                ('image', models.FileField(blank=True, null=True, upload_to='images/')),
                ('timestamp', models.DateTimeField(default=django.utils.timezone.now)),
                ('expireDateTime', models.DateTimeField(null=True)),
                ('status', models.CharField(choices=[('Live', 'Live'), ('Expired', 'Expired')], default='Live', max_length=100)),
                ('personID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='response',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('no_of_like', models.IntegerField(null=True)),
                ('no_of_dislike', models.IntegerField(null=True)),
                ('no_of_comment', models.IntegerField(null=True)),
                ('interactionID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='piazza.interaction')),
                ('postID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='piazza.post')),
            ],
        ),
        migrations.AddField(
            model_name='interaction',
            name='personID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='piazza.person'),
        ),
        migrations.AddField(
            model_name='interaction',
            name='postID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='piazza.post'),
        ),
    ]
