# Generated by Django 2.1.2 on 2018-11-04 09:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('bookmarkcollection', '0002_bookmarkcollection_user'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('ingredients', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Bookmark',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('collection', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='bookmarkcollection.BookmarkCollection')),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=100, unique=True, verbose_name='이름')),
                ('calories', models.SmallIntegerField(blank=True, null=True)),
                ('created_date', models.DateTimeField(auto_now_add=True)),
                ('modified_date', models.DateTimeField(auto_now=True)),
                ('bookmarker', models.ManyToManyField(related_name='bookmarked_recipe', through='recipes.Bookmark', to=settings.AUTH_USER_MODEL)),
                ('bread', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ingredients.Bread', verbose_name='빵')),
                ('cheese', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ingredients.Cheese', verbose_name='치즈')),
                ('inventor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='made_recipe', to=settings.AUTH_USER_MODEL, verbose_name='레시피 제작자')),
                ('liker', models.ManyToManyField(related_name='liked_recipe', through='recipes.Like', to=settings.AUTH_USER_MODEL)),
                ('sandwich', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ingredients.Sandwich', verbose_name='기본 샌드위치')),
                ('sauces', models.ManyToManyField(to='ingredients.Sauces', verbose_name='소스')),
                ('toasting', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ingredients.Toasting', verbose_name='토스팅')),
                ('toppings', models.ManyToManyField(to='ingredients.Toppings', verbose_name='토핑')),
                ('vegetables', models.ManyToManyField(to='ingredients.Vegetables', verbose_name='야채')),
            ],
            options={
                'ordering': ['-created_date'],
            },
        ),
        migrations.AddField(
            model_name='like',
            name='recipe',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipes.Recipe'),
        ),
        migrations.AddField(
            model_name='like',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='bookmark',
            name='recipe',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recipes.Recipe'),
        ),
        migrations.AddField(
            model_name='bookmark',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
