# Generated by Django 3.1.1 on 2020-12-24 11:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="TweetAccount",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("fullname", models.CharField(max_length=255)),
                ("username", models.CharField(max_length=255)),
                ("twitter_id", models.PositiveIntegerField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name="TweetHashtag",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name="Tweet",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("tweet_id", models.PositiveIntegerField(unique=True)),
                ("created_at", models.DateTimeField()),
                ("like_count", models.PositiveIntegerField()),
                ("reply_count", models.PositiveIntegerField()),
                ("retweet_count", models.PositiveIntegerField()),
                ("text", models.TextField(max_length=280)),
                (
                    "account",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, related_name="tweets", to="scraper.tweetaccount"
                    ),
                ),
                ("hashtags", models.ManyToManyField(blank=True, related_name="tweets", to="scraper.TweetHashtag")),
            ],
            options={
                "ordering": ("-tweet_id",),
            },
        ),
    ]
