# Generated by Django 3.0.8 on 2020-09-07 12:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_name', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_name', models.CharField(max_length=100, unique=True)),
                ('product_url', models.URLField(unique=True)),
                ('product_img', models.URLField()),
                ('product_nutriscore', models.CharField(max_length=10)),
                ('product_category_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapp.Category')),
                ('user_product', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Nutriments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nutriments_kj', models.CharField(max_length=20)),
                ('nutriments_kcal', models.CharField(max_length=20)),
                ('nutriments_lipids', models.CharField(max_length=20)),
                ('nutriments_fat', models.CharField(max_length=20)),
                ('nutriments_carbohydrates', models.CharField(max_length=20)),
                ('nutriments_sugar', models.CharField(max_length=20)),
                ('nutriments_protein', models.CharField(max_length=20)),
                ('nutriments_salt', models.CharField(max_length=20)),
                ('nutriments_sodium', models.CharField(max_length=20)),
                ('nutriments_product_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webapp.Product')),
            ],
        ),
    ]
