# Generated by Django 3.2.3 on 2021-05-26 22:38

from django.conf import settings
import django.core.validators
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='Customer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', models.CharField(max_length=20, unique=True)),
                ('City', models.CharField(max_length=20)),
                ('Area', models.CharField(max_length=20)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Customers',
            },
        ),
        migrations.CreateModel(
            name='FoodItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('It_Name', models.CharField(max_length=200)),
                ('It_Kind', models.CharField(max_length=200)),
                ('It_Size', models.CharField(max_length=200)),
                ('It_Prise', models.IntegerField(default=0, null=True)),
                ('It_Descrip', models.CharField(default='null', max_length=200)),
                ('F_Images', models.ImageField(default='null', upload_to='images')),
                ('F_Rate', models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(5)])),
            ],
        ),
        migrations.CreateModel(
            name='Restaurant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('R_Type', models.CharField(max_length=150)),
                ('R_Phone', models.BigIntegerField(default=0, unique=True)),
                ('R_City', models.CharField(max_length=200)),
                ('R_Area', models.CharField(default='Qena', max_length=200)),
                ('R_Image', models.ImageField(default='null', upload_to='images')),
                ('R_Rate', models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(5)])),
                ('RImage_Cover', models.ImageField(default='null', upload_to='media/images')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Restaurants',
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('D_Name', models.CharField(default='null', max_length=200)),
                ('D_time', models.DateTimeField(auto_now=True)),
                ('D_totalCost', models.DecimalField(decimal_places=2, default=0, max_digits=5)),
                ('customers', models.ManyToManyField(to='fastfoodapp.Customer')),
                ('foods', models.ManyToManyField(to='fastfoodapp.FoodItem')),
                ('restaurants', models.ManyToManyField(to='fastfoodapp.Restaurant')),
            ],
        ),
        migrations.AddField(
            model_name='fooditem',
            name='foods',
            field=models.ManyToManyField(to='fastfoodapp.Restaurant'),
        ),
        migrations.CreateModel(
            name='Addtocard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('orders_Name', models.CharField(default='null', max_length=200)),
                ('customer_id', models.ManyToManyField(default=0, to='fastfoodapp.Customer')),
                ('meal', models.ManyToManyField(default=0, to='fastfoodapp.FoodItem')),
                ('restaurnt_id', models.ManyToManyField(default=0, to='fastfoodapp.Restaurant')),
            ],
        ),
    ]
