# Generated by Django 3.2.5 on 2021-08-09 23:07

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('countryId', models.CharField(max_length=2)),
                ('countryName', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('languageId', models.CharField(max_length=2, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Sentiment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mixed', models.CharField(default='0.0', max_length=50)),
                ('positive', models.CharField(default='0.0', max_length=50)),
                ('neutral', models.CharField(default='0.0', max_length=50)),
                ('negative', models.CharField(default='0.0', max_length=50)),
                ('sentiment', models.CharField(default='0', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('topic', models.TextField(default='DEFAULT_TOPIC', unique=True)),
                ('context', models.TextField(blank=True, default='', null=True)),
                ('locale', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.country')),
            ],
        ),
        migrations.CreateModel(
            name='SpotInstance',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('spotNum', models.IntegerField()),
                ('keywords', models.TextField(default='')),
                ('locale', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.country')),
                ('topic', models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.topic')),
            ],
        ),
        migrations.CreateModel(
            name='Source',
            fields=[
                ('sourceId', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('sourceName', models.CharField(max_length=50)),
                ('language', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.language')),
                ('locale', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.country')),
            ],
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.URLField(unique=True)),
                ('title', models.TextField(default='DEFAULT_TITLE')),
                ('author', models.CharField(blank=True, max_length=50, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('urlToImage', models.URLField(blank=True, null=True)),
                ('publishedAt', models.TextField(blank=True, null=True)),
                ('content', models.TextField(blank=True, null=True)),
                ('fullDesc', models.TextField(default='')),
                ('keyword', models.ForeignKey(default='DEFAULT_TOPIC_ID', on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.topic')),
                ('sentimentScore', models.ForeignKey(default='DEFAULT_SENTIMENT_ID', on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.sentiment')),
                ('source', models.ForeignKey(default='DEFAULT_SOURCE_ID', on_delete=django.db.models.deletion.CASCADE, to='ProjectAPI.source')),
            ],
            options={
                'ordering': ['publishedAt'],
            },
        ),
    ]
