# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2019-03-09 21:32
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Direction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(blank=True, verbose_name='Direction|text')),
            ],
            options={
                'ordering': ['id'],
                'verbose_name': 'Direction',
                'verbose_name_plural': 'Directions',
            },
        ),
        migrations.CreateModel(
            name='Ingredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.FloatField(blank=True, null=True, verbose_name='Ingredient|amount')),
                ('amountMax', models.FloatField(blank=True, null=True)),
                ('direction', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ingredients', to='recipeapp.Direction')),
            ],
            options={
                'ordering': ['direction', 'id'],
                'verbose_name': 'Ingredient',
                'verbose_name_plural': 'Ingredients',
            },
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('caption', models.CharField(max_length=200, verbose_name='Photo|caption')),
                ('keep', models.BooleanField(default=True, editable=False)),
            ],
            options={
                'verbose_name': 'Photo',
                'verbose_name_plural': 'Photos',
            },
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='Recipe|title')),
                ('summary', models.CharField(blank=True, max_length=500, verbose_name='Recipe|summary')),
                ('description', models.TextField(blank=True, verbose_name='Recipe|description')),
                ('slug', models.SlugField(unique=True)),
                ('prep_time', models.CharField(blank=True, max_length=100)),
                ('serving_value', models.IntegerField(blank=True, null=True)),
                ('rating', models.IntegerField(blank=True, default=0, null=True)),
                ('created_time', models.DateTimeField(auto_now_add=True)),
                ('modified_time', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['title'],
                'verbose_name': 'Recipe',
                'verbose_name_plural': 'Recipies',
            },
        ),
        migrations.AddField(
            model_name='photo',
            name='recipe',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='recipeapp.Recipe'),
        ),
        migrations.AddField(
            model_name='ingredient',
            name='recipe',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipeapp.Recipe'),
        ),
        migrations.AddField(
            model_name='direction',
            name='recipe',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='directions', to='recipeapp.Recipe'),
        ),
    ]
