# Generated by Django 3.0.3 on 2020-02-19 12:34

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='Ingredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('name_en_us', models.CharField(max_length=255, null=True, verbose_name='Name')),
                ('name_de_de', models.CharField(max_length=255, null=True, verbose_name='Name')),
            ],
            options={
                'verbose_name': 'Ingredient',
                'verbose_name_plural': 'Ingredients',
            },
        ),
        migrations.CreateModel(
            name='KitchenUtility',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('name_en_us', models.CharField(max_length=255, null=True, verbose_name='Name')),
                ('name_de_de', models.CharField(max_length=255, null=True, verbose_name='Name')),
            ],
            options={
                'verbose_name': 'Kitchen utility',
                'verbose_name_plural': 'Kitchen utilities',
            },
        ),
        migrations.CreateModel(
            name='Pantry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name': 'Pantry',
                'verbose_name_plural': 'Pantries',
            },
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('image', models.ImageField(blank=True, null=True, upload_to='', verbose_name='Image')),
                ('experience_level', models.CharField(choices=[('NOV', 'Novice'), ('INT', 'Intermediate'), ('ADV', 'Advanced'), ('EXP', 'Expert')], max_length=255, verbose_name='Required cooking experience')),
                ('fat', models.PositiveIntegerField(help_text='How much fat does one portion contain?', verbose_name='Fat')),
                ('carbohydrates', models.PositiveIntegerField(help_text='How much carbohydrates does one portion contain?', verbose_name='Carbohydrates')),
                ('sugar', models.PositiveIntegerField(help_text='How much sugar does one portion contain?', verbose_name='Sugar')),
                ('roughage', models.PositiveIntegerField(help_text='How much roughage does one portion contain?', verbose_name='Roughage')),
                ('protein', models.PositiveIntegerField(help_text='How much protein does one portion contain?', verbose_name='Protein')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Recipe',
                'verbose_name_plural': 'Recipes',
            },
        ),
        migrations.CreateModel(
            name='Vendor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Vendor')),
            ],
            options={
                'verbose_name': 'Vendor',
                'verbose_name_plural': 'Vendors',
            },
        ),
        migrations.CreateModel(
            name='UsedKitchenUtility',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.PositiveIntegerField(default=1, help_text='How often is this kitchen utility used?', verbose_name='Amount')),
                ('kitchen_utility', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.KitchenUtility')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.Recipe')),
            ],
            options={
                'verbose_name': 'Used kitchen utility',
                'verbose_name_plural': 'Used kitchen utilities',
            },
        ),
        migrations.CreateModel(
            name='UsedIngredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.PositiveIntegerField(help_text='Please specify the used amount of the ingredient', verbose_name='Amount')),
                ('unit', models.CharField(choices=[('KG', 'kg'), ('G', 'g'), ('MG', 'mg'), ('L', 'l'), ('ML', 'ml'), ('TEA', 'teaspoon'), ('TBL', 'tablespoon'), ('PINCH', 'pinch'), ('PIECE', 'piece')], max_length=10, verbose_name='Unit for amount')),
                ('ingredient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.Ingredient')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.Recipe')),
            ],
            options={
                'verbose_name': 'Used ingredient',
                'verbose_name_plural': 'Used ingredients',
            },
        ),
        migrations.CreateModel(
            name='StoredIngredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.PositiveIntegerField(help_text='Please specify the stored amount of the ingredient', verbose_name='Amount')),
                ('unit', models.CharField(choices=[('KG', 'kg'), ('G', 'g'), ('MG', 'mg'), ('L', 'l'), ('ML', 'ml'), ('TEA', 'teaspoon'), ('TBL', 'tablespoon'), ('PINCH', 'pinch'), ('PIECE', 'piece')], max_length=10, verbose_name='Unit for amount')),
                ('ingredient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.Ingredient')),
                ('pantry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.Pantry')),
            ],
            options={
                'verbose_name': 'Stored ingredient',
                'verbose_name_plural': 'Stored ingredients',
            },
        ),
        migrations.AddField(
            model_name='recipe',
            name='ingredients',
            field=models.ManyToManyField(through='food_planner.UsedIngredient', to='food_planner.Ingredient'),
        ),
        migrations.AddField(
            model_name='recipe',
            name='kitchen_utilities',
            field=models.ManyToManyField(through='food_planner.UsedKitchenUtility', to='food_planner.KitchenUtility'),
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('daily_fat_demand', models.PositiveIntegerField(default=117, help_text='At most this amount of fat is needed per day', verbose_name='Daily fat demand')),
                ('daily_carbohydrate_demand', models.PositiveIntegerField(default=150, help_text='At most this amount of carbohydrates is needed per day', verbose_name='Daily carbohydrate demand')),
                ('daily_sugar_demand', models.PositiveIntegerField(default=25, help_text='At most this amount of sugar is needed per day', verbose_name='Daily sugar demand')),
                ('daily_roughage_demand', models.PositiveIntegerField(default=30, help_text='At least this amount of roughage should be eaten per day', verbose_name='Daily roughage demand')),
                ('daily_protein_demand', models.PositiveIntegerField(default=90, help_text='At most this amount of protein should be eaten per day', verbose_name='Daily protein demand')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Profile',
                'verbose_name_plural': 'Profiles',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Product')),
                ('amount', models.PositiveIntegerField(help_text='Please specify the provided amount of the ingredient', verbose_name='Amount')),
                ('unit', models.CharField(choices=[('KG', 'kg'), ('G', 'g'), ('MG', 'mg'), ('L', 'l'), ('ML', 'ml'), ('TEA', 'teaspoon'), ('TBL', 'tablespoon'), ('PINCH', 'pinch'), ('PIECE', 'piece')], max_length=10, verbose_name='Unit for amount')),
                ('price', models.DecimalField(blank=True, decimal_places=2, default=0.0, max_digits=4, verbose_name='Price')),
                ('ingredient', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='food_planner.Ingredient')),
                ('vendor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.Vendor')),
            ],
            options={
                'verbose_name': 'Product',
                'verbose_name_plural': 'Products',
            },
        ),
        migrations.AddField(
            model_name='pantry',
            name='ingredients',
            field=models.ManyToManyField(through='food_planner.StoredIngredient', to='food_planner.Ingredient'),
        ),
        migrations.AddField(
            model_name='pantry',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='RecipeStep',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to='', verbose_name='Image')),
                ('description', models.TextField(verbose_name='Description')),
                ('number_of_step', models.PositiveIntegerField(verbose_name='Number of step')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='food_planner.Recipe')),
            ],
            options={
                'verbose_name': 'Recipe step',
                'verbose_name_plural': 'Recipe steps',
                'unique_together': {('recipe', 'number_of_step')},
            },
        ),
    ]
