# Generated by Django 3.2.4 on 2021-06-15 14:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BlogPost',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200, unique=True)),
                ('slug', models.SlugField(max_length=100)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('featured', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('email', models.EmailField(max_length=254)),
                ('comment', models.TextField()),
                ('votes', models.IntegerField()),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.blogpost')),
            ],
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('image', models.ImageField(upload_to='images')),
                ('description', models.TextField()),
                ('servings', models.IntegerField()),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('ingredients', models.TextField()),
                ('steps', models.TextField()),
                ('calories', models.CharField(max_length=20)),
                ('carbs', models.CharField(max_length=10)),
                ('protein', models.CharField(max_length=10)),
                ('fibre', models.CharField(max_length=10)),
                ('fat', models.CharField(max_length=10)),
                ('blogpost', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='recipe', to='posts.blogpost')),
                ('categories', models.ManyToManyField(blank=True, related_name='recipeslist', to='posts.Category')),
            ],
            options={
                'ordering': ['-timestamp'],
            },
        ),
    ]
