# Generated by Django. Initial migration for BankAccount, Payee, and Check models.
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="BankAccount",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=255)),
                ("street_1", models.CharField(blank=True, max_length=255)),
                ("street_2", models.CharField(blank=True, max_length=255)),
                ("city", models.CharField(blank=True, max_length=255)),
                ("phone", models.CharField(blank=True, max_length=50)),
                ("routing_number", models.CharField(max_length=20)),
                ("account_number", models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name="Payee",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=255)),
                ("street_1", models.CharField(blank=True, max_length=255)),
                ("street_2", models.CharField(blank=True, max_length=255)),
                ("city", models.CharField(blank=True, max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name="Check",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("payor_name", models.CharField(max_length=255)),
                ("payor_street_1", models.CharField(blank=True, max_length=255)),
                ("payor_street_2", models.CharField(blank=True, max_length=255)),
                ("payor_city", models.CharField(blank=True, max_length=255)),
                ("payor_phone", models.CharField(blank=True, max_length=50)),
                ("payor_account_number", models.CharField(blank=True, max_length=20)),
                ("check_number", models.PositiveIntegerField()),
                ("amount", models.DecimalField(decimal_places=2, max_digits=10)),
                ("memo", models.CharField(blank=True, max_length=255)),
                ("invoice", models.CharField(blank=True, max_length=255)),
                ("check_date", models.DateField(default=django.utils.timezone.now)),
                ("pdf", models.FileField(blank=True, null=True, upload_to="checks/")),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("updated", models.DateTimeField(auto_now=True)),
                (
                    "bank_account",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="papercheck.BankAccount",
                    ),
                ),
                (
                    "payee",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="papercheck.Payee",
                    ),
                ),
            ],
        ),
    ]
