# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-08-17 01:56
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Compra_Produto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('purchase_date_product', models.DateField()),
                ('value_per_unit_to_buy', models.FloatField()),
                ('amout_purchased', models.FloatField()),
                ('date_vaidate', models.DateField()),
            ],
            options={
                'verbose_name_plural': 'Compra produtos',
            },
        ),
        migrations.CreateModel(
            name='Fornecedor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150)),
                ('type_product', models.CharField(choices=[('Limpeza', 'Limpeza'), ('Escritorio', 'Escritorio'), ('Informatica', 'Informatica'), ('Bucal profissional', 'Bucal profissional'), ('Bucal venda', 'Bucal venda')], max_length=150)),
                ('cnpj', models.CharField(max_length=30, unique=True)),
                ('social_name', models.CharField(max_length=150)),
                ('fantasy_name', models.CharField(max_length=150)),
                ('matrix', models.CharField(max_length=150)),
                ('street', models.CharField(max_length=150)),
                ('district', models.CharField(max_length=150)),
                ('phone', models.CharField(max_length=150)),
                ('site', models.CharField(blank=True, max_length=150)),
                ('state_registration', models.CharField(max_length=150)),
                ('note', models.TextField()),
                ('active', models.BooleanField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Montante',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('montante', models.CharField(max_length=150)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Produto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150)),
                ('mark', models.CharField(max_length=150)),
                ('amount', models.FloatField()),
                ('value_per_unit_to_buy', models.FloatField()),
                ('purchase_date', models.DateField()),
                ('date_vaidate', models.DateField()),
                ('product_type', models.CharField(choices=[('Limpeza', 'Limpeza'), ('Escritorio', 'Escritorio'), ('Informatica', 'Informatica'), ('Bucal profissional', 'Bucal profissional'), ('Bucal venda', 'Bucal venda')], max_length=150)),
                ('active', models.BooleanField()),
                ('provider', models.ManyToManyField(to='app_estoque.Fornecedor')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Produtos',
            },
        ),
        migrations.CreateModel(
            name='Retira_Produto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_for_withdrawal', models.DateTimeField()),
                ('amount_withdrawal', models.FloatField()),
                ('amout_refresh', models.CharField(max_length=150)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app_estoque.Produto')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Retira produtos',
            },
        ),
        migrations.AddField(
            model_name='compra_produto',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app_estoque.Produto'),
        ),
        migrations.AddField(
            model_name='compra_produto',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
