# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-07-18 13:37
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='Categorias',
            fields=[
                ('cod_cat', models.BigIntegerField(db_column='COD_CAT', primary_key=True, serialize=False)),
                ('desc_cat', models.CharField(blank=True, db_column='DESC_CAT', max_length=40, null=True)),
                ('cod_supercat', models.BigIntegerField(blank=True, db_column='COD_SUPERCAT', null=True)),
                ('mostrar_cat', models.CharField(blank=True, db_column='MOSTRAR_CAT', max_length=17, null=True)),
                ('apelido_cat', models.CharField(blank=True, db_column='APELIDO_CAT', max_length=50, null=True)),
            ],
            options={
                'verbose_name_plural': 'Categorias',
                'db_table': 'CATEGORIAS',
                'verbose_name': 'Categoria',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Clientes',
            fields=[
                ('cod_cli', models.BigIntegerField(db_column='COD_CLI', primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, db_column='NOME_CLI', max_length=80, null=True)),
            ],
            options={
                'db_table': 'CLIENTES',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Contrato',
            fields=[
                ('cod_contrato', models.BigAutoField(db_column='COD_CONTRATO', primary_key=True, serialize=False)),
                ('num_contrato', models.CharField(db_column='NUM_CONTRATO', max_length=11)),
                ('empresa', models.CharField(db_column='EMPRESA', max_length=1)),
                ('data_criacao', models.DateTimeField(db_column='DATA_CRIACAO')),
                ('ind_ativo', models.NullBooleanField(db_column='IND_ATIVO')),
            ],
            options={
                'db_table': 'CONTRATO',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='ContratoCliente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'db_table': 'CONTRATO_CLIENTE',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='GrupoUsuarios',
            fields=[
                ('cod_grupo', models.BigIntegerField(primary_key=True, serialize=False)),
                ('desc_grupo', models.CharField(blank=True, max_length=20, null=True)),
            ],
            options={
                'db_table': 'GRUPO_USUARIOS',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Produtos',
            fields=[
                ('cod_prod', models.BigIntegerField(db_column='COD_PROD', primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, db_column='DESC_PROD', max_length=300, null=True)),
                ('min_prod', models.IntegerField(blank=True, db_column='MIN_PROD', null=True)),
                ('saldo_prod', models.BigIntegerField(blank=True, db_column='SALDO_PROD', null=True)),
                ('teorico_prod', models.BigIntegerField(blank=True, db_column='TEORICO_PROD', null=True)),
                ('custoref_prod', models.DecimalField(blank=True, db_column='CUSTOREF_PROD', decimal_places=4, max_digits=19, null=True)),
                ('custo_prod', models.DecimalField(blank=True, db_column='CUSTO_PROD', decimal_places=4, max_digits=19, null=True)),
            ],
            options={
                'verbose_name_plural': 'Produtos',
                'db_table': 'PRODUTOS',
                'verbose_name': 'Produto',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='TechUser',
            fields=[
                ('username', models.CharField(db_column='NOME_USER', max_length=30, primary_key=True, serialize=False, unique=True)),
                ('password', models.CharField(blank=True, db_column='SENHA_USER', max_length=10, null=True)),
                ('ip', models.CharField(blank=True, db_column='IP_HOST', max_length=13, null=True)),
                ('nickname', models.CharField(blank=True, db_column='APELIDO_USER', max_length=20, null=True)),
                ('skype', models.CharField(blank=True, db_column='APELIDO_SKYPE', max_length=40, null=True)),
            ],
            options={
                'db_table': 'USUARIOS',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='TipoContrato',
            fields=[
                ('cod_tip_cont', models.BigAutoField(db_column='COD_TIP_CONT', primary_key=True, serialize=False)),
                ('nome_tip_cont', models.CharField(db_column='NOME_TIP_CONT', max_length=30)),
                ('desc_tipo_cont', models.CharField(db_column='DESC_TIPO_CONT', max_length=200)),
            ],
            options={
                'db_table': 'TIPO_CONTRATO',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='UnidadeNegocio',
            fields=[
                ('cod_unid_neg', models.BigAutoField(db_column='COD_UNID_NEG', primary_key=True, serialize=False)),
                ('nivel', models.CharField(db_column='NIVEL', max_length=10)),
                ('nome_unid_neg', models.CharField(db_column='NOME_UNID_NEG', max_length=30)),
                ('desc_unid_nego', models.CharField(db_column='DESC_UNID_NEGO', max_length=200)),
            ],
            options={
                'db_table': 'UNIDADE_NEGOCIO',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='ClientePytech',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_reff', models.PositiveIntegerField(verbose_name='ID Sistech')),
                ('name', models.CharField(max_length=255, verbose_name='Razão Social')),
                ('nick_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='Apelido')),
                ('comments', models.TextField(blank=True, null=True)),
                ('active', models.NullBooleanField(default=False)),
                ('tipo', models.PositiveIntegerField(choices=[(1, 'Hospital'), (2, 'Clinica Medica'), (3, 'Graficas'), (4, 'Igrejas'), (5, 'Industrias'), (6, 'Epresas de Seguranças'), (7, 'Outros')], default=1, verbose_name='Ramo')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name_plural': 'Clientes',
                'verbose_name': 'Cliente',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(blank=True, max_length=50, null=True)),
                ('categoria', models.IntegerField(choices=[(1, 'SUGESTÃO'), (2, 'SOLITAÇÃO'), (3, 'RECLAMAÇÃO'), (4, 'RECLAMAÇÃO ANONIMA')], default=1)),
                ('assunto', models.CharField(max_length=100)),
                ('menssagem', models.TextField()),
                ('data_created', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(blank=True, default=0, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Contatos',
                'verbose_name': 'Contato',
                'ordering': ['-data_created'],
            },
        ),
        migrations.CreateModel(
            name='GrupoClientePytech',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Nome do Grupo')),
            ],
        ),
        migrations.CreateModel(
            name='ProdutoPytech',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('desc', models.CharField(max_length=100, verbose_name='DESC')),
                ('ativo', models.NullBooleanField(default=True)),
                ('sn', models.CharField(max_length=18, verbose_name='SN')),
                ('cliente', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='produtos', to='core.ClientePytech')),
            ],
            options={
                'verbose_name_plural': 'Pytech Produtos',
                'verbose_name': 'Pytech Produto ',
                'ordering': ['-id'],
            },
        ),
    ]
