# Generated by Django 3.1.5 on 2021-02-12 09:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('asset', '0001_initial'),
        ('nota', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='criado em')),
                ('modified', models.DateTimeField(auto_now=True, verbose_name='modificado em')),
                ('date', models.DateField()),
                ('operation', models.CharField(choices=[('C', 'Compra'), ('V', 'Venda'), ('DT', 'Day Trade'), ('S/I', 'Split ou Inplit'), ('AT', 'Alteração Ticker'), ('BN', 'Bonificação'), ('AM', 'Amortização'), ('SUB', 'Compra de Subscrição'), ('V.SUB', 'Venda Direito Subscrição'), ('V.SOB', 'Venda de sobras de S/I ou Cisão'), ('CISÃO', 'Operação de cião de capital social'), ('EX.OPC', 'Venda ou Compra por Exercício de Opção')], default='C', max_length=6)),
                ('amount', models.DecimalField(blank=True, decimal_places=5, max_digits=10, null=True)),
                ('price', models.DecimalField(decimal_places=5, max_digits=10)),
                ('commission', models.DecimalField(blank=True, decimal_places=5, max_digits=10, null=True)),
                ('account_bank', models.CharField(blank=True, max_length=45, null=True)),
                ('obs', models.CharField(blank=True, max_length=200, null=True)),
                ('total', models.DecimalField(blank=True, decimal_places=5, max_digits=10, null=True)),
                ('profit', models.DecimalField(blank=True, decimal_places=5, max_digits=10, null=True)),
                ('last_update', models.DateTimeField(auto_now_add=True)),
                ('asset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='asset', to='asset.asset')),
                ('nota_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='nota', to='nota.nota')),
            ],
            options={
                'verbose_name': 'transaction',
                'verbose_name_plural': 'transactions',
                'ordering': ('date',),
            },
        ),
    ]
