# Generated by Django 2.2.7 on 2019-11-22 16:45

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='TwitterUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('followed_by', models.ManyToManyField(related_name='_twitteruser_followed_by_+', to='twitterclone.TwitterUser')),
                ('following', models.ManyToManyField(related_name='_twitteruser_following_+', to='twitterclone.TwitterUser')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tweet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('body', models.TextField(max_length=140)),
                ('post_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('TweetAuthor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tweet_author', to='twitterclone.TwitterUser')),
                ('dislikes', models.ManyToManyField(related_name='dislikes', to='twitterclone.TwitterUser')),
                ('likes', models.ManyToManyField(related_name='likes', to='twitterclone.TwitterUser')),
            ],
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tweet_viewed', models.BooleanField(default=False)),
                ('tweet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notification_tweet', to='twitterclone.Tweet')),
                ('twitter_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notification_user', to='twitterclone.TwitterUser')),
            ],
        ),
    ]
