<filename>news/migrations/0001_initial.py
# Generated by Django 3.0.8 on 2020-07-08 22:11

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='News',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=200)),
                ('author_name', models.CharField(max_length=50)),
                ('price', models.FloatField()),
                ('creation_date', models.DateTimeField(blank=True, default=None, null=True)),
                ('sale_end', models.DateTimeField(blank=True, default=None, null=True)),
                ('link', models.URLField(null=True)),
                ('likes', models.IntegerField(default=0, verbose_name='Like')),
                ('dislikes', models.IntegerField(default=0, verbose_name='Dislike')),
            ],
        ),
        migrations.CreateModel(
            name='ShoppingCart',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=200)),
                ('address', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='ShoppingCartItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('news', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='news.News')),
                ('shopping_cart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', related_query_name='item', to='news.ShoppingCart')),
            ],
        ),
    ]
