# Generated by Django 6.0.1 on 2026-01-21 20:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CustomerProfile',
            fields=[
                ('id', models.PositiveBigIntegerField(blank=True, primary_key=True, serialize=False)),
                ('email', models.EmailField(blank=True, max_length=255)),
                ('merchant_id', models.CharField(blank=True, max_length=20)),
                ('description', models.TextField(blank=True, max_length=255)),
            ],
            options={
                'verbose_name': 'customer profile',
                'verbose_name_plural': 'customer profiles',
            },
        ),
        migrations.CreateModel(
            name='CustomerPaymentProfile',
            fields=[
                ('id', models.PositiveBigIntegerField(blank=True, primary_key=True, serialize=False)),
                ('is_default', models.BooleanField(default=False)),
                ('first_name', models.CharField(blank=True, max_length=50)),
                ('last_name', models.CharField(blank=True, max_length=50)),
                ('company', models.CharField(blank=True, max_length=50)),
                ('address', models.CharField(blank=True, max_length=60)),
                ('city', models.CharField(blank=True, max_length=40)),
                ('state', models.CharField(blank=True, max_length=40)),
                ('zip', models.CharField(blank=True, max_length=20)),
                ('country', models.CharField(blank=True, max_length=60)),
                ('phone_number', models.CharField(blank=True, max_length=25)),
                ('card_number', models.CharField(blank=True, max_length=16)),
                ('card_expiry', models.DateField(blank=True, default=None, null=True)),
                ('card_code', models.CharField(blank=True, max_length=4)),
                ('card_type', models.CharField(blank=True)),
                ('account_type', models.CharField(blank=True, choices=[('checking', 'Checking'), ('savings', 'Savings'), ('businessChecking', 'Business checking')])),
                ('account_number', models.CharField(blank=True, max_length=17)),
                ('routing_number', models.CharField(blank=True, max_length=9)),
                ('account_name', models.CharField(blank=True, max_length=22)),
                ('echeck_type', models.CharField(blank=True, choices=[('PPD', 'PPD'), ('WEB', 'WEB'), ('CCD', 'CCD')])),
                ('bank_name', models.CharField(blank=True, max_length=50)),
                ('customer_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_profiles', to='terminusgps_payments.customerprofile')),
            ],
            options={
                'verbose_name': 'payment profile',
                'verbose_name_plural': 'payment profiles',
            },
        ),
        migrations.CreateModel(
            name='CustomerAddressProfile',
            fields=[
                ('id', models.PositiveBigIntegerField(blank=True, primary_key=True, serialize=False)),
                ('is_default', models.BooleanField(default=False)),
                ('first_name', models.CharField(blank=True, max_length=50)),
                ('last_name', models.CharField(blank=True, max_length=50)),
                ('company', models.CharField(blank=True, max_length=50)),
                ('address', models.CharField(blank=True, max_length=60)),
                ('city', models.CharField(blank=True, max_length=40)),
                ('state', models.CharField(blank=True, max_length=40)),
                ('zip', models.CharField(blank=True, max_length=20)),
                ('country', models.CharField(blank=True, max_length=60)),
                ('phone_number', models.CharField(blank=True, max_length=25)),
                ('customer_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='address_profiles', to='terminusgps_payments.customerprofile')),
            ],
            options={
                'verbose_name': 'address profile',
                'verbose_name_plural': 'address profiles',
            },
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.PositiveBigIntegerField(blank=True, primary_key=True, serialize=False)),
                ('name', models.CharField(blank=True, max_length=50)),
                ('interval_length', models.IntegerField(default=1)),
                ('interval_unit', models.CharField(choices=[('days', 'Days'), ('months', 'Months')], default='months')),
                ('start_date', models.DateField(blank=True, default=None, null=True)),
                ('total_occurrences', models.IntegerField(default=9999)),
                ('trial_occurrences', models.IntegerField(default=0)),
                ('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=15)),
                ('trial_amount', models.DecimalField(blank=True, decimal_places=2, default=Decimal('0.00'), max_digits=15)),
                ('status', models.CharField(choices=[('active', 'Active'), ('expired', 'Expired'), ('suspended', 'Suspended'), ('canceled', 'Canceled'), ('terminated', 'Terminated')], default='active')),
                ('address_profile', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='subscriptions', to='terminusgps_payments.customeraddressprofile')),
                ('customer_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subscriptions', to='terminusgps_payments.customerprofile')),
                ('payment_profile', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='subscriptions', to='terminusgps_payments.customerpaymentprofile')),
            ],
            options={
                'verbose_name': 'subscription',
                'verbose_name_plural': 'subscriptions',
            },
        ),
    ]
