# 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 = [
        ('cadastros', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Entrega',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cartao_numero', models.CharField(max_length=50, verbose_name='Número do Cartão')),
                ('peso_carregado', models.PositiveIntegerField(default=None, verbose_name='Caminhão Carregado (em Kg)')),
                ('peso_vazio', models.PositiveIntegerField(default=None, verbose_name='Caminhão vazio (em Kg)')),
                ('peso_carga', models.PositiveIntegerField(blank=True, default=None, null=True, verbose_name='Peso da carga (em Kg)')),
                ('valor_carga_total', models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=15, null=True, verbose_name='Valor da carga')),
                ('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')),
                ('caminhao_placa', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Caminhao', verbose_name='Placa do Caminhão')),
                ('empresa_nome', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Empresa', verbose_name='Nome da Empresa')),
                ('material', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Material', verbose_name='Material')),
                ('motorista_cpf', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Motorista', verbose_name='CPF do Motorista')),
                ('usuario', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Coleta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quant_retiradas', models.PositiveIntegerField(default=1, verbose_name='Retiradas')),
                ('cartao_numero', models.CharField(max_length=50, verbose_name='Tag RFID')),
                ('peso_vazio', models.PositiveIntegerField(blank=True, default=None, verbose_name='Caminhão vazio (em Kg)')),
                ('peso_carregado', models.PositiveIntegerField(default=None, verbose_name='Caminhão carregado (em Kg)')),
                ('peso_carga', models.PositiveIntegerField(blank=True, default=None, null=True, verbose_name='Peso da carga (em Kg)')),
                ('valor_carga_total', models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=15, null=True, verbose_name='Valor da carga')),
                ('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')),
                ('caminhao_placa', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Caminhao', verbose_name='Placa do Caminhão')),
                ('empresa_nome', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Empresa', verbose_name='Nome da Empresa')),
                ('grupo', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Grupo', verbose_name='Grupo de Materiais')),
                ('material', models.ManyToManyField(blank=True, to='cadastros.Material', verbose_name='Material')),
                ('motorista_cpf', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='cadastros.Motorista', verbose_name='CPF do Motorista')),
                ('usuario', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-id'],
            },
        ),
    ]
