# Generated by Django 3.1.3 on 2021-04-11 18:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("persons", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="Account",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "balance",
                    models.DecimalField(
                        decimal_places=2, default=Decimal("0.00"), max_digits=16
                    ),
                ),
                (
                    "max_daily_withdraw",
                    models.DecimalField(
                        decimal_places=2, default=Decimal("0.00"), max_digits=16
                    ),
                ),
                ("active", models.BooleanField(default=True)),
                ("type", models.PositiveIntegerField(default=1)),
                ("created", models.DateTimeField(auto_now_add=True)),
                (
                    "person",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="account",
                        to="persons.person",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Transaction",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("value", models.DecimalField(decimal_places=2, max_digits=16)),
                ("created", models.DateTimeField()),
                (
                    "account",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="transaction",
                        to="accounts.account",
                    ),
                ),
            ],
        ),
    ]
