# Generated by Django 2.2 on 2019-04-14 09:46

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='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='0000000', max_length=63)),
            ],
        ),
        migrations.CreateModel(
            name='MenuItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=63)),
                ('diffrentWithSize', models.BooleanField(default=False)),
                ('isPizza', models.BooleanField(default=False)),
                ('price', models.FloatField(default=0)),
                ('priceBig', models.FloatField(default=0)),
                ('toppingCount', models.IntegerField(default=0)),
                ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='orders.Category')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.IntegerField(default=1)),
                ('price', models.FloatField(default=0)),
                ('isPizza', models.BooleanField(default=False)),
                ('toppingCount', models.IntegerField(default=0)),
                ('toppings', models.CharField(max_length=200)),
                ('menuItem', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='orders.MenuItem')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('totalPrice', models.FloatField(default=0)),
                ('isConfirmed', models.BooleanField(default=False)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('address', models.CharField(default=False, max_length=1000)),
                ('isPaid', models.BooleanField(default=False)),
                ('orderItems', models.ManyToManyField(to='orders.OrderItem')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
