# Generated by Django 3.0.4 on 2020-06-03 20:17

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='Empresa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_empresa', models.CharField(max_length=50, unique=True, verbose_name='Nome da Empresa')),
                ('cnpj', models.CharField(max_length=20, unique=True, verbose_name='CNPJ')),
                ('cep', models.CharField(max_length=9, verbose_name='CEP')),
                ('endereco', models.CharField(max_length=100, verbose_name='Endereço')),
                ('bairro', models.CharField(max_length=25, verbose_name='Bairro')),
                ('cidade', models.CharField(max_length=20, verbose_name='Cidade')),
                ('uf', models.CharField(choices=[('AC', 'AC'), ('AL', 'AL'), ('AP', 'AP'), ('BA', 'BA'), ('CE', 'CE'), ('DF', 'DF'), ('ES', 'ES'), ('GO', 'GO'), ('MA', 'MA'), ('MT', 'MT'), ('MS', 'MS'), ('MG', 'MG'), ('PA', 'PA'), ('PB', 'PB'), ('PR', 'PR'), ('PE', 'PE'), ('PI', 'PI'), ('RJ', 'RJ'), ('RN', 'RN'), ('RS', 'RS'), ('RO', 'RO'), ('RR', 'RR'), ('SC', 'SC'), ('SP', 'SP'), ('SE', 'SE'), ('TO', 'TO')], max_length=3, verbose_name='UF')),
                ('responsavel', models.CharField(blank=True, max_length=50, null=True, verbose_name='Responsável')),
                ('telefone1', models.CharField(blank=True, max_length=20, null=True, verbose_name='Telefone 1')),
                ('telefone2', models.CharField(blank=True, max_length=20, null=True, verbose_name='Telefone 2')),
                ('area_atuacao', models.CharField(blank=True, max_length=50, null=True, verbose_name='Área de Atuação')),
                ('ativo', models.BooleanField(default=True)),
                ('data_criacao', models.DateTimeField(auto_now_add=True, verbose_name='Data de Criação')),
                ('data_alteracao', models.DateTimeField(auto_now=True, verbose_name='Ultima Alteração')),
                ('usuario', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Grupo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_grupo', models.CharField(max_length=50, unique=True, verbose_name='Grupo de Materiais')),
                ('preco_grupo', models.DecimalField(blank=True, decimal_places=2, default=1, max_digits=8, null=True, verbose_name='Preço do Grupo de Materiais')),
                ('ativo', models.BooleanField(default=True)),
                ('data_criacao', models.DateTimeField(auto_now_add=True, verbose_name='Data de Criação')),
                ('data_alteracao', models.DateTimeField(auto_now=True, verbose_name='Ultima Alteração')),
                ('usuario', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['nome_grupo'],
            },
        ),
        migrations.CreateModel(
            name='Motorista',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cpf', models.CharField(max_length=15, unique=True, verbose_name='CPF')),
                ('nome_completo', models.CharField(max_length=100, verbose_name='Nome Completo')),
                ('cnh', models.CharField(max_length=15, unique=True, verbose_name='CNH')),
                ('categoria_cnh', models.CharField(choices=[('AB', 'AB'), ('B', 'B'), ('C', 'C'), ('D', 'D'), ('E', 'E')], max_length=2, verbose_name='Categoria CNH')),
                ('ativo', models.BooleanField(default=True)),
                ('data_criacao', models.DateTimeField(auto_now_add=True, verbose_name='Data de Criação')),
                ('data_alteracao', models.DateTimeField(auto_now=True, verbose_name='Ultima Alteração')),
                ('empresa', models.ManyToManyField(to='cadastros.Empresa')),
                ('usuario', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['nome_completo'],
            },
        ),
        migrations.CreateModel(
            name='Material',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_material', models.CharField(max_length=50, unique=True, verbose_name='Material')),
                ('preco_material', models.DecimalField(blank=True, decimal_places=2, default=1, max_digits=8, null=True, verbose_name='Preço do Material (por Tonelada)')),
                ('tipo', models.CharField(choices=[('Entrega', 'Entrega'), ('Coleta', 'Coleta')], default=None, max_length=10, verbose_name='Evento')),
                ('ativo', models.BooleanField(default=True)),
                ('data_criacao', models.DateTimeField(auto_now_add=True, verbose_name='Data de Criação')),
                ('data_alteracao', models.DateTimeField(auto_now=True, verbose_name='Ultima Alteração')),
                ('minha_ordem', models.PositiveIntegerField(default=1000)),
                ('nome_grupo', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Grupo', verbose_name='Grupo de Materiais')),
                ('usuario', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Materiais',
                'ordering': ['minha_ordem'],
            },
        ),
        migrations.CreateModel(
            name='Caminhao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('placa', models.CharField(max_length=9, unique=True, verbose_name='Placa')),
                ('marca', models.CharField(max_length=20, verbose_name='Marca')),
                ('modelo', models.CharField(max_length=20, verbose_name='Modelo')),
                ('cor', models.CharField(max_length=20, verbose_name='Cor')),
                ('ativo', models.BooleanField(default=True)),
                ('data_criacao', models.DateTimeField(auto_now_add=True, verbose_name='Data de Criação')),
                ('data_alteracao', models.DateTimeField(auto_now=True, verbose_name='Ultima Alteração')),
                ('empresa', models.ManyToManyField(to='cadastros.Empresa')),
                ('usuario', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Caminhão',
                'verbose_name_plural': 'Caminhões',
                'ordering': ['marca'],
            },
        ),
    ]
