# Generated by Django 3.2.5 on 2021-07-28 21:01

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='Asset',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Nome')),
                ('modality', models.CharField(choices=[('rf', 'Renda Fixa'), ('rv', 'Renda Variável'), ('cp', 'Cripto')], max_length=2, verbose_name='Modalidade')),
                ('price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Preço')),
            ],
            options={
                'verbose_name': 'Ativo',
                'verbose_name_plural': 'Ativos',
            },
        ),
        migrations.CreateModel(
            name='Wallet',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('owner', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='wallet', to=settings.AUTH_USER_MODEL, verbose_name='Proprietário')),
            ],
            options={
                'verbose_name': 'Carteira',
                'verbose_name_plural': 'Carteiras',
            },
        ),
        migrations.CreateModel(
            name='Rescue',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField(verbose_name='Quantidade')),
                ('price_unit', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Preço Unitário')),
                ('date', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Data')),
                ('ip_access', models.GenericIPAddressField(blank=True, null=True, verbose_name='Endereço de IP')),
                ('asset', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='financial.asset', verbose_name='Ativo')),
                ('wallet', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='financial.wallet', verbose_name='Carteira')),
            ],
            options={
                'verbose_name': 'Resgate',
                'verbose_name_plural': 'Resgates',
            },
        ),
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField(verbose_name='Quantidade')),
                ('price_unit', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Preço Unitário')),
                ('date', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Data')),
                ('ip_access', models.GenericIPAddressField(blank=True, null=True, verbose_name='Endereço de IP')),
                ('asset', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='financial.asset', verbose_name='Ativo')),
                ('wallet', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='financial.wallet', verbose_name='Carteira')),
            ],
            options={
                'verbose_name': 'Aplicação',
                'verbose_name_plural': 'Aplicações',
            },
        ),
    ]
