# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-27 14:24
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Fridge',
            fields=[
                ('fridge_id', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('brand', models.CharField(max_length=200)),
                ('model', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('item_id', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('item_name', models.CharField(max_length=50)),
                ('calories', models.IntegerField()),
                ('unit', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Item_Fridge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.FloatField()),
                ('unit', models.CharField(max_length=20)),
                ('fridge_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='smartfridgeapp.Fridge')),
                ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='smartfridgeapp.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Item_Meal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.FloatField()),
                ('unit', models.CharField(max_length=20)),
                ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='smartfridgeapp.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Item_Store',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.FloatField()),
                ('unit', models.CharField(max_length=20)),
                ('item_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='smartfridgeapp.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Meal',
            fields=[
                ('meal_id', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('meal_name', models.CharField(max_length=50)),
                ('meal_recipe', models.CharField(max_length=1000)),
                ('items', models.ManyToManyField(through='smartfridgeapp.Item_Meal', to='smartfridgeapp.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Store',
            fields=[
                ('store_id', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('store_name', models.CharField(max_length=50)),
                ('phone_no', models.CharField(max_length=20)),
                ('address', models.CharField(max_length=200)),
                ('website', models.URLField()),
                ('products', models.ManyToManyField(through='smartfridgeapp.Item_Store', to='smartfridgeapp.Item')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('user_id', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('user_name', models.CharField(max_length=50)),
                ('password', models.CharField(max_length=20)),
                ('email', models.CharField(max_length=20)),
                ('phone_no', models.CharField(max_length=20)),
            ],
        ),
        migrations.AddField(
            model_name='item_store',
            name='store_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='smartfridgeapp.Store'),
        ),
        migrations.AddField(
            model_name='item_meal',
            name='meal_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='smartfridgeapp.Meal'),
        ),
        migrations.AddField(
            model_name='fridge',
            name='items',
            field=models.ManyToManyField(through='smartfridgeapp.Item_Fridge', to='smartfridgeapp.Item'),
        ),
        migrations.AddField(
            model_name='fridge',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='smartfridgeapp.User'),
        ),
    ]
