# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-04-28 04:23
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='inventory',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('creation_date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='inventory_products',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('creation_date', models.DateField()),
                ('quantity', models.IntegerField()),
                ('inventory_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.inventory')),
            ],
        ),
        migrations.CreateModel(
            name='order',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('creation_date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='order_products',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('quantity', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='product',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=40)),
                ('description', models.CharField(max_length=40)),
                ('price', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='status',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('description', models.CharField(max_length=40)),
            ],
        ),
        migrations.CreateModel(
            name='type',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=40)),
            ],
        ),
        migrations.CreateModel(
            name='user',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('username', models.CharField(max_length=40)),
                ('password', models.CharField(max_length=40)),
                ('commercial_name', models.CharField(max_length=40)),
                ('city', models.CharField(max_length=40)),
                ('state', models.CharField(max_length=40)),
                ('district', models.CharField(max_length=40)),
                ('postal_code', models.CharField(max_length=40)),
                ('shipping_notes', models.CharField(max_length=40)),
                ('pos_lat', models.FloatField()),
                ('pos_lon', models.FloatField()),
                ('creation_date', models.DateField()),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='type_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.type'),
        ),
        migrations.AddField(
            model_name='order_products',
            name='product_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.product'),
        ),
        migrations.AddField(
            model_name='order',
            name='owner_user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owner', to='app.user'),
        ),
        migrations.AddField(
            model_name='order',
            name='requester_user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='requester', to='app.user'),
        ),
        migrations.AddField(
            model_name='order',
            name='status_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.status'),
        ),
        migrations.AddField(
            model_name='inventory_products',
            name='product_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.product'),
        ),
        migrations.AddField(
            model_name='inventory',
            name='user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.user'),
        ),
    ]
