# Generated by Django 3.2.3 on 2021-06-27 16:00

from django.contrib.postgres.operations import UnaccentExtension
from django.db import migrations, models

class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        UnaccentExtension(),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('designation', models.CharField(max_length=150, unique=True)),
            ],
            options={
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('designation', models.CharField(max_length=250)),
                ('barcode', models.CharField(max_length=13)),
                ('brand', models.CharField(max_length=60)),
                ('nutriscore', models.CharField(max_length=1)),
                ('fat_value', models.FloatField(null=True)),
                ('fat_level', models.CharField(choices=[('LO', 'faible quantité'), ('MO', 'quantité modérée'), ('HI', 'quantité élevée')], default=None, max_length=2, null=True)),
                ('saturated_fat_value', models.FloatField(null=True)),
                ('saturated_fat_level', models.CharField(choices=[('LO', 'faible quantité'), ('MO', 'quantité modérée'), ('HI', 'quantité élevée')], default=None, max_length=2, null=True)),
                ('sugars_value', models.FloatField(null=True)),
                ('sugars_level', models.CharField(choices=[('LO', 'faible quantité'), ('MO', 'quantité modérée'), ('HI', 'quantité élevée')], default=None, max_length=2, null=True)),
                ('salt_value', models.FloatField(null=True)),
                ('salt_level', models.CharField(choices=[('LO', 'faible quantité'), ('MO', 'quantité modérée'), ('HI', 'quantité élevée')], default=None, max_length=2, null=True)),
                ('url', models.URLField()),
                ('image_url', models.URLField(max_length=150)),
            ],
            options={
                'verbose_name_plural': 'products',
            },
        ),
        migrations.CreateModel(
            name='Store',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('designation', models.CharField(max_length=200, unique=True)),
                ('products', models.ManyToManyField(related_name='stores', to='food.Product')),
            ],
            options={
                'verbose_name_plural': 'stores',
            },
        ),
    ]
