# Generated by Django 3.1.6 on 2021-02-18 02:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('registrations', '0001_initial'),
        ('RMS', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomerManagementTable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Customer_Name', models.CharField(max_length=30)),
                ('Customer_Phone', models.IntegerField()),
                ('Customer_Order_Count', models.IntegerField()),
                ('Restaurant_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registrations.restaurantregistrationtable')),
            ],
        ),
        migrations.CreateModel(
            name='OrderManagementTable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Customer_Order_Count', models.IntegerField()),
                ('Items_Ordered', models.CharField(max_length=500)),
                ('Order_Price', models.FloatField()),
                ('Order_Type', models.CharField(choices=[('dinein', 'Dine-in'), ('delivery', 'Delivery'), ('takeaway', 'Takeaway')], max_length=20)),
                ('Number_of_seats', models.IntegerField()),
                ('Table_Number', models.IntegerField()),
                ('Discount_Percentage', models.IntegerField()),
                ('Amount_To_Pay', models.FloatField()),
                ('Amount_Recieved', models.FloatField()),
                ('Balance_Returned', models.FloatField()),
                ('Order_Date', models.DateField(auto_now_add=True)),
                ('Order_Time', models.TimeField(auto_now_add=True)),
                ('Invoice', models.ImageField(upload_to='')),
                ('Customer_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='POS.customermanagementtable')),
                ('Restaurant_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registrations.restaurantregistrationtable')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItemsTable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Item_Name', models.CharField(max_length=50)),
                ('Item_Price', models.FloatField()),
                ('Item_Quantity', models.FloatField()),
                ('Discount_Percentage', models.IntegerField()),
                ('Total_Item_Price', models.FloatField()),
                ('Customer_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='POS.customermanagementtable')),
                ('Item_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='RMS.menuitemstable')),
                ('Restaurant_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='registrations.restaurantregistrationtable')),
            ],
        ),
    ]
