# Generated by Django 2.2.2 on 2019-06-05 19:58

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CoffeeUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('account', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='CoffeMachine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Drink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=150)),
                ('price', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Ingredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=150)),
                ('price', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coffee_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='coffeemachine.CoffeeUser')),
                ('drink', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='coffeemachine.Drink')),
                ('ingredients', models.ManyToManyField(to='coffeemachine.Ingredient')),
            ],
        ),
        migrations.CreateModel(
            name='IngredientList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.IntegerField()),
                ('coffeemachine', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='coffeemachine.CoffeMachine')),
                ('ingredient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='coffeemachine.Ingredient')),
            ],
        ),
        migrations.CreateModel(
            name='DrinkList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.IntegerField()),
                ('coffeemachine', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='coffeemachine.CoffeMachine')),
                ('drink', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='coffeemachine.Drink')),
            ],
        ),
        migrations.AddField(
            model_name='coffeeuser',
            name='current_order',
            field=models.OneToOneField(blank=True, default=None, on_delete=django.db.models.deletion.CASCADE, to='coffeemachine.Order'),
        ),
        migrations.AddField(
            model_name='coffeeuser',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
