# Generated by Django 2.2.6 on 2019-11-05 15:06

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('recipe_id', models.AutoField(primary_key=True, serialize=False)),
                ('recipe_name', models.CharField(max_length=100)),
                ('recipe_description', models.TextField()),
                ('recipe_img_url', models.CharField(max_length=300)),
                ('servings', models.IntegerField()),
                ('preparation_time', models.FloatField(validators=[django.core.validators.MinValueValidator(0.01)])),
            ],
        ),
        migrations.CreateModel(
            name='IngredientInRecipe',
            fields=[
                ('recipe_ingredient_id', models.AutoField(primary_key=True, serialize=False)),
                ('amount_in_recipe', models.FloatField(validators=[django.core.validators.MinValueValidator(0.01)])),
                ('cost', models.FloatField(validators=[django.core.validators.MinValueValidator(0.01)])),
                ('ingredient', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='ingredient.Ingredient')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='recipe_ingredients', to='recipes.Recipe')),
            ],
        ),
    ]
