# Generated by Django 3.2 on 2021-05-03 04:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('products', '0003_auto_20210503_0015'),
        ('units', '0002_unit_to_si_unit'),
    ]

    operations = [
        migrations.CreateModel(
            name='Ingredient',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ingredient_amount', models.FloatField(default=1.0)),
                ('ingredient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.product')),
                ('ingredient_unit', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='units.unit')),
            ],
            options={
                'verbose_name': 'Ingredient',
                'verbose_name_plural': 'Ingredients',
            },
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120, unique=True)),
                ('total_cost', models.FloatField(blank=True)),
                ('created_ts', models.DateTimeField(auto_now_add=True)),
                ('updated_ts', models.DateTimeField(auto_now=True)),
                ('ingredients', models.ManyToManyField(to='recipes.Ingredient')),
            ],
            options={
                'verbose_name': 'Recipe',
                'verbose_name_plural': 'Recipes',
            },
        ),
    ]
