# Generated by Django 3.0.7 on 2020-06-15 17:38

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='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_timestamp', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='member', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'order',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Pizza',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=60, unique=True)),
                ('description', models.CharField(max_length=250)),
                ('price', models.DecimalField(decimal_places=2, default=0.0, editable=False, max_digits=4)),
            ],
            options={
                'db_table': 'pizza',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='OrderDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Qty', models.IntegerField(default=1)),
                ('itemId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='onlinepizzas.Pizza')),
                ('orderId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='onlinepizzas.Order')),
            ],
            options={
                'db_table': 'order_details',
                'managed': True,
            },
        ),
    ]
