# Generated by Django 2.2.1 on 2019-05-10 07:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Tweet',
            fields=[
                ('id_str', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('text', models.TextField()),
                ('created_at', models.DateTimeField()),
                ('favorite_count', models.IntegerField()),
                ('retweet_count', models.IntegerField()),
                ('lang', models.CharField(max_length=10)),
                ('location', models.CharField(blank=True, max_length=100, null=True)),
                ('coordinates_lat', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
                ('coordinates_long', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TweetHashTag',
            fields=[
                ('text', models.CharField(max_length=100, primary_key=True, serialize=False)),
            ],
            options={
                'verbose_name': 'Hash-tag de tweet',
                'verbose_name_plural': 'Hash-tags de tweets',
                'ordering': ['text'],
            },
        ),
        migrations.CreateModel(
            name='TweetUser',
            fields=[
                ('id_str', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('screen_name', models.CharField(max_length=100)),
                ('location', models.CharField(blank=True, max_length=100, null=True)),
                ('url', models.URLField(blank=True, default=None, null=True)),
            ],
            options={
                'verbose_name': 'Usuario de Twitter',
                'verbose_name_plural': 'Usuarios de tweets',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='TweetMedia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_str', models.CharField(max_length=100)),
                ('url', models.URLField()),
                ('media_url', models.URLField()),
                ('media_url_https', models.URLField()),
                ('local_image', models.ImageField(max_length=256, upload_to='tweet_medias', verbose_name='local_url')),
                ('type', models.CharField(max_length=50)),
                ('is_meme', models.BooleanField(null=True)),
                ('tweet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tweets.Tweet')),
            ],
            options={
                'verbose_name': 'Imagen de tweet',
                'verbose_name_plural': 'Imágenes de los tweets',
                'ordering': ['tweet'],
            },
        ),
        migrations.AddField(
            model_name='tweet',
            name='hashtags',
            field=models.ManyToManyField(to='tweets.TweetHashTag'),
        ),
        migrations.AddField(
            model_name='tweet',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tweets.TweetUser'),
        ),
    ]
