# Generated by Django 3.1.4 on 2020-12-04 08:21

from django.conf import settings
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 = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('main', '0005_delete_menu'),
    ]

    operations = [
        migrations.CreateModel(
            name='Menu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_name', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('stock', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('price', models.FloatField(validators=[django.core.validators.MinValueValidator(1)])),
                ('item_type', models.CharField(choices=[('food', 'FOOD'), ('dessert', 'DESSERT'), ('drink', 'DRINK')], default='Food', max_length=8)),
                ('ordered_by', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_ordered', models.DateTimeField(default=django.utils.timezone.now)),
                ('order_status', models.CharField(choices=[('delivered', 'DELIVERED'), ('canceled', 'CANCELED'), ('in process', 'IN PROCESS'), ('preparing', 'PREPARING')], default='IN PROCESS', max_length=12)),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.menu')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
