# Generated by Django 3.1.3 on 2021-02-27 07:16

from django.conf import settings
import django.core.files.storage
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('UserManagement', '0006_useraddress_special_address_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(storage=django.core.files.storage.FileSystemStorage(location='/home/natan/Desktop/celavie/foodDeliverBkEnd/media'), upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Food',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.TextField()),
                ('min_order', models.IntegerField(default=1)),
                ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('sale_price', models.DecimalField(decimal_places=2, default='0.00', max_digits=10)),
                ('is_active', models.BooleanField(default=True)),
                ('time_stamp', models.TimeField(auto_now=True)),
                ('picture', models.ImageField(null=True, storage=django.core.files.storage.FileSystemStorage(location='/home/natan/Desktop/celavie/foodDeliverBkEnd/media'), upload_to='')),
                ('added_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FoodCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='NoOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('reason', models.CharField(max_length=150)),
                ('end_date', models.DateTimeField(null=True)),
                ('suspended', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='OpeningAndClosing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('openingTime', models.TimeField()),
                ('closingTime', models.TimeField()),
                ('date', models.CharField(choices=[('Monday', 'Monday'), ('Tuesday', 'Tuesday'), ('Wednesday', 'Wednesday'), ('Thursday', 'Thursday'), ('Friday', 'Friday'), ('Saturday', 'Saturday'), ('Sunday', 'Sunday')], max_length=20, null=True, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_order', models.IntegerField(default=1)),
                ('time_stamp', models.TimeField(auto_now=True)),
                ('food_id', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='Order.food')),
            ],
        ),
        migrations.CreateModel(
            name='TotalOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_stamp', models.DateTimeField(auto_now_add=True)),
                ('date', models.DateField(auto_now=True)),
                ('status', models.CharField(choices=[('Waiting', 'Waiting'), ('Located', 'Located'), ('Placed', 'Placed'), ('Acknowledged', 'Acknowledged'), ('Completed', 'Completed'), ('Dispatched', 'Dispatched'), ('Delivered', 'Delivered'), ('Cancelled', 'Cancelled')], default='Waiting', max_length=50)),
                ('derliver_address', models.CharField(max_length=50, null=True)),
                ('longtide', models.DecimalField(decimal_places=14, max_digits=17, null=True)),
                ('latitude', models.DecimalField(decimal_places=14, max_digits=17, null=True)),
                ('pay_online', models.BooleanField(default=False)),
                ('payment_condition', models.BooleanField(default=False)),
                ('total', models.DecimalField(decimal_places=2, default='0.00', max_digits=10)),
                ('delivery_time', models.DateTimeField(null=True)),
                ('phoneNo', models.CharField(max_length=14, null=True)),
                ('orders', models.ManyToManyField(blank=True, to='Order.Order')),
                ('restaurant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='UserManagement.restaurant')),
                ('user_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SpecialOffer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.TextField()),
                ('total_price', models.IntegerField(default=0)),
                ('foods', models.ManyToManyField(to='Order.Food')),
            ],
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('what_is_it_about', models.CharField(max_length=100)),
                ('detail', models.TextField()),
                ('read_and_called_back', models.BooleanField(default=False)),
                ('order', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Order.totalorder')),
                ('reported_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='food',
            name='type_of_food',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='Order.foodcategory'),
        ),
        migrations.CreateModel(
            name='Delivery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('current_lat', models.CharField(max_length=150)),
                ('current_lon', models.CharField(max_length=150)),
                ('start_time', models.DateTimeField(auto_now=True)),
                ('end_time', models.DateTimeField(null=True)),
                ('delivered', models.BooleanField(default=False)),
                ('user_disappeared', models.BooleanField(default=False)),
                ('accident_happened', models.BooleanField(default=False)),
                ('assigned_deliverer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('total_order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Order.totalorder')),
            ],
        ),
    ]
