# Generated by Django 2.2.1 on 2019-06-03 21:55

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('user', '0001_initial'),
    ]

    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=64, verbose_name='Ingredient Name')),
                ('description', models.TextField(verbose_name='Ingredient Description')),
                ('created_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified_time', models.DateTimeField(auto_now=True, null=True)),
            ],
            options={
                'verbose_name': 'Ingredient',
                'verbose_name_plural': 'Ingredients',
            },
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, verbose_name='Recipe Title')),
                ('created_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified_time', models.DateTimeField(auto_now=True, null=True)),
                ('author', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='user.UserProfile', verbose_name='Recipe Author')),
            ],
            options={
                'verbose_name': 'Recipe',
                'verbose_name_plural': 'Recipes',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag_text', models.CharField(max_length=24, verbose_name='Tag')),
                ('created_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified_time', models.DateTimeField(auto_now=True, null=True)),
            ],
            options={
                'verbose_name': 'Tag',
                'verbose_name_plural': 'Tags',
            },
        ),
        migrations.CreateModel(
            name='RecipeTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipe.Recipe', verbose_name='Recipe tagged')),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipe.Tag', verbose_name='Tag used')),
            ],
            options={
                'verbose_name': 'Tag in Recipe',
                'verbose_name_plural': 'Tags in Recipe',
            },
        ),
        migrations.CreateModel(
            name='RecipeNote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('note_text', models.TextField(verbose_name='Note')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipe.Recipe')),
            ],
            options={
                'verbose_name': 'Note about Recipe',
                'verbose_name_plural': 'Notes about Recipe',
            },
        ),
        migrations.CreateModel(
            name='RecipeIngredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity_amount', models.CharField(max_length=10, verbose_name='Ingredient quantity')),
                ('quantity_unit', models.CharField(max_length=24, verbose_name='Ingredient quantity units')),
                ('ingredient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipe.Ingredient', verbose_name='Ingredient used')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipe.Recipe', verbose_name='Recipe used')),
            ],
            options={
                'verbose_name': 'Ingredient used in Recipe',
                'verbose_name_plural': 'Ingredients used in Recipe',
            },
        ),
        migrations.AddField(
            model_name='recipe',
            name='ingredients',
            field=models.ManyToManyField(through='recipe.RecipeIngredient', to='recipe.Ingredient'),
        ),
        migrations.AddField(
            model_name='recipe',
            name='tags',
            field=models.ManyToManyField(through='recipe.RecipeTag', to='recipe.Tag'),
        ),
        migrations.CreateModel(
            name='RecipeStep',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('step_number', models.PositiveSmallIntegerField(default=0)),
                ('step_text', models.TextField(verbose_name='Step Directions')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipe.Recipe')),
            ],
            options={
                'verbose_name': 'Step in Recipe',
                'verbose_name_plural': 'Steps in Recipe',
                'unique_together': {('id', 'step_number')},
            },
        ),
    ]
