# Generated by Django 3.0.2 on 2020-07-30 10:55

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import food.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Food_types',
            fields=[
                ('food_id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(default='', max_length=100)),
                ('description', models.CharField(max_length=2048)),
                ('price', models.PositiveIntegerField(default=0)),
                ('category', models.CharField(choices=[('Veg', 'Veg'), ('Non-Veg', 'Non-Veg'), ('Semi Non-Veg', 'Semi Non-Veg')], default='Veg', max_length=20)),
                ('image_path', models.ImageField(default='', upload_to=food.models.upload_food_type)),
                ('is_active', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'Food Types',
                'verbose_name_plural': 'Food Types',
                'db_table': 'food_types',
            },
        ),
        migrations.CreateModel(
            name='Mess',
            fields=[
                ('mess_id', models.AutoField(primary_key=True, serialize=False)),
                ('mess_name', models.CharField(max_length=250)),
                ('address', models.CharField(max_length=500)),
                ('date_posted', models.DateTimeField(default=datetime.datetime(2020, 7, 30, 16, 25, 7, 102276))),
                ('image_path', models.ImageField(default='', upload_to=food.models.upload_path_handler)),
                ('is_active', models.BooleanField(default=False)),
                ('exp_date', models.DateTimeField(default=datetime.datetime(2020, 7, 30, 16, 25, 7, 102276))),
                ('area', models.ForeignKey(db_column='area', on_delete=django.db.models.deletion.CASCADE, to='accounts.Area')),
                ('city', models.ForeignKey(db_column='city', on_delete=django.db.models.deletion.CASCADE, to='accounts.City')),
                ('user_id', models.ForeignKey(db_column='user_id', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Mess',
                'verbose_name_plural': 'Mess',
                'db_table': 'mess',
            },
        ),
        migrations.CreateModel(
            name='Tiffin_types',
            fields=[
                ('type_id', models.AutoField(primary_key=True, serialize=False)),
                ('type_name', models.CharField(max_length=30, unique=True)),
                ('is_active', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'Tiffin Types',
                'verbose_name_plural': 'Tiffin Types',
                'db_table': 'tiffin_types',
            },
        ),
        migrations.CreateModel(
            name='MessVendorPayment',
            fields=[
                ('payment_id', models.AutoField(primary_key=True, serialize=False)),
                ('date_of_payment', models.DateTimeField(default=datetime.datetime(2020, 7, 30, 16, 25, 7, 119233))),
                ('order_id', models.CharField(default='', max_length=30)),
                ('mess_id', models.ForeignKey(db_column='mess_id', on_delete=django.db.models.deletion.CASCADE, to='food.Mess')),
                ('package_id', models.ForeignKey(db_column='package_id', on_delete=django.db.models.deletion.CASCADE, to='accounts.Packages')),
                ('user_id', models.ForeignKey(db_column='user_id', default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Mess Payments',
                'verbose_name_plural': 'Mess Payments',
                'db_table': 'mess_vendor_payment',
            },
        ),
        migrations.CreateModel(
            name='Mess_bookings',
            fields=[
                ('booking_id', models.AutoField(primary_key=True, serialize=False)),
                ('booking_date', models.DateTimeField(default=datetime.datetime(2020, 7, 30, 16, 25, 7, 118236))),
                ('is_active', models.BooleanField(default=True)),
                ('food_id', models.ForeignKey(db_column='food_id', default='', on_delete=django.db.models.deletion.CASCADE, to='food.Food_types')),
                ('mess_id', models.ForeignKey(db_column='mess_id', on_delete=django.db.models.deletion.CASCADE, to='food.Mess')),
                ('user_id', models.ForeignKey(db_column='user_id', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Mess Bookings',
                'verbose_name_plural': 'Mess Bookings',
                'db_table': 'mess_bookings',
            },
        ),
        migrations.AddField(
            model_name='food_types',
            name='mess_id',
            field=models.ForeignKey(db_column='mess_id', on_delete=django.db.models.deletion.CASCADE, to='food.Mess'),
        ),
        migrations.AddField(
            model_name='food_types',
            name='tiffin_id',
            field=models.ForeignKey(db_column='tiffin_id', on_delete=django.db.models.deletion.CASCADE, to='food.Tiffin_types'),
        ),
    ]
