# Generated by Django 3.0.3 on 2020-03-02 14:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao_categoria', models.TextField(unique=True, verbose_name='categoria')),
            ],
        ),
        migrations.CreateModel(
            name='Subcategoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao_subcategoria', models.CharField(blank=True, max_length=30, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='TipoDocumento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo_documento', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='TipoTransacao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipo_transacao', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Despesa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_created=True, auto_now_add=True)),
                ('data_despesa', models.DateField(verbose_name='data')),
                ('valor_despesa', models.DecimalField(decimal_places=2, max_digits=8)),
                ('descricao_despesa', models.TextField(max_length=255)),
                ('documento_complemento', models.CharField(blank=True, max_length=50)),
                ('transacao_complemento', models.CharField(blank=True, max_length=50)),
                ('categoria', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='despesa.Categoria')),
                ('documento', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='despesa.TipoDocumento')),
                ('subcategoria', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='despesa.Subcategoria')),
                ('transacao', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='despesa.TipoTransacao')),
            ],
        ),
    ]
