# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-29 00:49
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('foto', models.ImageField(default='fotos/user/person-flat.png', upload_to='fotos/clientes/')),
            ],
            options={
                'verbose_name': 'Cliente',
                'verbose_name_plural': 'Clientes',
            },
            managers=[
                ('cliente', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Documento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(choices=[('CPF', 'CPF'), ('RG', 'RG')], default='CPF', max_length=1)),
                ('emicao', models.DateField(default=datetime.date.today, verbose_name='Data de emi\xe7\xe3o')),
                ('numero', models.CharField(default='vazio', max_length=250, verbose_name='N\xfamero')),
            ],
            managers=[
                ('documento', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Endereco',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(choices=[('Residencial', 'Residencial'), ('Trabalho', 'Trabalho'), ('Comercial', 'Comercial')], default='Residencial', max_length=1)),
                ('numero', models.IntegerField(default=1)),
                ('cep', models.CharField(default='1', max_length=250, verbose_name='Cep')),
                ('complemento', models.CharField(default='vazio', max_length=250, verbose_name='Complemento')),
                ('estado', models.CharField(default='vazio', max_length=250, verbose_name='Estado')),
                ('enderecoStr', models.CharField(default='vazio', max_length=250, verbose_name='Endere\xe7o')),
            ],
            managers=[
                ('endereco', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Financeiro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qtdParcelas', models.IntegerField(default=1)),
                ('valorDaParcela', models.DecimalField(decimal_places=2, max_digits=15)),
                ('Desconto', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
                ('valorPago', models.DecimalField(decimal_places=2, default=0, max_digits=15)),
            ],
            managers=[
                ('financeiro', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Fornecedor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('foto', models.ImageField(default='fotos/user/person-flat.png', upload_to='fotos/fornecedores/')),
                ('documento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Documento')),
                ('endereco', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Endereco')),
            ],
            options={
                'verbose_name': 'Fornecedor',
                'verbose_name_plural': 'Fornecedores',
            },
            managers=[
                ('fornecedor', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Pedido',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantidade', models.IntegerField(default=1)),
                ('valorTotal', models.DecimalField(decimal_places=2, max_digits=15)),
                ('financeiro', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Financeiro')),
            ],
            managers=[
                ('pedido', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Produto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(choices=[('novo', 'Novo'), ('usado', 'Usado')], default='novo', max_length=20)),
                ('categoria', models.CharField(choices=[('Animais', 'Animais'), ('Comidas', 'Comidas'), ('Eletrodom\xe9sticos', 'Eletrodom\xe9sticos'), ('Games', 'Games'), ('Livros', 'Livros'), ('Antiguidades', 'Antiguidades'), ('Ve\xedculos', 'Ve\xedculos'), ('M\xfasica', 'M\xfasica'), ('Outros', 'Outros')], default='Outros', max_length=20)),
                ('foto', models.ImageField(default='fotos/produtos/produto.png', upload_to='fotos/produtos/')),
                ('titulo', models.CharField(max_length=250, verbose_name='T\xedtulo')),
                ('descricao', models.CharField(max_length=300, verbose_name='Descricao')),
                ('estoque', models.IntegerField(default=1)),
                ('vendidos', models.IntegerField(default=0)),
                ('valor', models.DecimalField(decimal_places=2, default=1, max_digits=15)),
                ('unidade', models.CharField(max_length=300, verbose_name='Unidade')),
                ('divididoAte', models.IntegerField(default=1)),
                ('parcela', models.DecimalField(decimal_places=2, default=1, max_digits=15)),
                ('fornecedor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Fornecedor')),
            ],
            options={
                'verbose_name': 'Produto',
                'verbose_name_plural': 'Produtos',
            },
            managers=[
                ('produto', django.db.models.manager.Manager()),
            ],
        ),
        migrations.CreateModel(
            name='Telefone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo', models.CharField(choices=[('Residencial', 'Residencial'), ('Trabalho', 'Trabalho'), ('Comercial', 'Comercial')], default='Residencial', max_length=1)),
                ('numero', models.CharField(default='vazio', max_length=250, verbose_name='N\xfamero')),
            ],
            managers=[
                ('telefone', django.db.models.manager.Manager()),
            ],
        ),
        migrations.AddField(
            model_name='pedido',
            name='produto',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Produto'),
        ),
        migrations.AddField(
            model_name='pedido',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='fornecedor',
            name='telefone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Telefone'),
        ),
        migrations.AddField(
            model_name='fornecedor',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='cliente',
            name='documento',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Documento'),
        ),
        migrations.AddField(
            model_name='cliente',
            name='endereco',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Endereco'),
        ),
        migrations.AddField(
            model_name='cliente',
            name='telefone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cadastro.Telefone'),
        ),
        migrations.AddField(
            model_name='cliente',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
