# Generated by Django 2.0.6 on 2018-11-11 05:53

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('Restaurants', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('Address_ID', models.AutoField(primary_key=True, serialize=False)),
                ('Home', models.CharField(max_length=250)),
                ('Society', models.CharField(max_length=250)),
                ('Area', models.CharField(max_length=250)),
                ('City', models.CharField(max_length=250)),
                ('State', models.CharField(max_length=250)),
                ('Pin', models.CharField(default=0, max_length=6)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('Customer_ID', models.AutoField(primary_key=True, serialize=False)),
                ('Customer_Fname', models.CharField(max_length=250)),
                ('Customer_Lname', models.CharField(max_length=250)),
                ('Customer_Num', models.CharField(max_length=17, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\+?1?\\d{9,15}$')])),
                ('Customer_Pic', models.ImageField(upload_to='Customers/Pictures/Profiles')),
                ('Customer_Email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('Item_ID', models.AutoField(primary_key=True, serialize=False)),
                ('Item_Quantity', models.IntegerField(verbose_name=django.core.validators.MaxValueValidator(10))),
                ('Item_Food_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Restaurants.Food')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('Order_ID', models.AutoField(primary_key=True, serialize=False)),
                ('Order_Status', models.IntegerField(verbose_name=django.core.validators.MaxValueValidator(5))),
                ('Order_Time', models.DateTimeField(default=django.utils.timezone.now)),
                ('Order_Customer_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Customers.Customer')),
                ('Order_Restaurant_ID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Restaurants.Restaurant')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='Item_Order_ID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Customers.Order'),
        ),
        migrations.AddField(
            model_name='address',
            name='Customer_ID',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Customers.Customer'),
        ),
    ]
