# Generated by Django 2.0.3 on 2020-01-18 19:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Dinnerplattername',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Dinnerplatterprice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dinnerplatters', to='orders.Dinnerplattername')),
            ],
        ),
        migrations.CreateModel(
            name='Maxtopping',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
                ('number', models.SmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('totalamount', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Orderitem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Pizzaprice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('maxtoppings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pizzaprices', to='orders.Maxtopping')),
            ],
        ),
        migrations.CreateModel(
            name='Pizzatype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Size',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Subname',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Subprice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('subname', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subprices', to='orders.Subname')),
                ('subsize', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subprices', to='orders.Size')),
            ],
        ),
        migrations.CreateModel(
            name='Topping',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Pastaprice',
            fields=[
                ('orderitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='orders.Orderitem')),
                ('name', models.CharField(max_length=64)),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
            ],
            bases=('orders.orderitem',),
        ),
        migrations.CreateModel(
            name='Pizza',
            fields=[
                ('orderitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='orders.Orderitem')),
                ('pizzasize', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pizzas', to='orders.Size')),
                ('pizzatype', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pizzas', to='orders.Pizzatype')),
                ('toppings', models.ManyToManyField(blank=True, related_name='pizzas', to='orders.Topping')),
            ],
            bases=('orders.orderitem',),
        ),
        migrations.CreateModel(
            name='Saladprice',
            fields=[
                ('orderitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='orders.Orderitem')),
                ('name', models.CharField(max_length=64)),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
            ],
            bases=('orders.orderitem',),
        ),
        migrations.CreateModel(
            name='Sub',
            fields=[
                ('orderitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='orders.Orderitem')),
                ('extramushrooms', models.BooleanField(default=False)),
                ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subs', to='orders.Subname')),
                ('size', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subs', to='orders.Size')),
            ],
            bases=('orders.orderitem',),
        ),
        migrations.AddField(
            model_name='pizzaprice',
            name='pizzasize',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pizzaprices', to='orders.Size'),
        ),
        migrations.AddField(
            model_name='pizzaprice',
            name='pizzatype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pizzaprices', to='orders.Pizzatype'),
        ),
        migrations.AddField(
            model_name='orderitem',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orders', to='orders.Category'),
        ),
        migrations.AddField(
            model_name='order',
            name='orderitems',
            field=models.ManyToManyField(blank=True, related_name='orders', to='orders.Orderitem'),
        ),
        migrations.AddField(
            model_name='dinnerplatterprice',
            name='size',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dinnerplatters', to='orders.Size'),
        ),
    ]
