# Generated by Django 6.0 on 2026-01-10 20:22

import datetime
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='PlanSuscripciones',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(max_length=50)),
                ('price', models.IntegerField()),
                ('interval', models.CharField(max_length=50)),
                ('intervalCount', models.IntegerField()),
                ('active', models.BooleanField(default=False)),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='MetodosPago',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('tipo', models.CharField(max_length=50)),
                ('lastFour', models.CharField(max_length=50)),
                ('brand', models.CharField(max_length=50)),
                ('expiryDate', models.DateTimeField(blank=True, null=True)),
                ('isDefault', models.BooleanField(default=False)),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
                ('userId', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Suscripciones',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('status', models.CharField(max_length=30)),
                ('startDate', models.DateTimeField(default=datetime.datetime(2026, 1, 10, 20, 22, 20, 494713, tzinfo=datetime.timezone.utc))),
                ('endDate', models.DateTimeField(default=datetime.datetime(2026, 1, 10, 20, 22, 20, 494736, tzinfo=datetime.timezone.utc))),
                ('nextBillingDate', models.DateTimeField(blank=True, null=True)),
                ('canceledAt', models.DateTimeField()),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
                ('planId', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='finanzas.plansuscripciones')),
                ('userId', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Pago',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('monto', models.IntegerField()),
                ('moneda', models.CharField(max_length=50)),
                ('status', models.CharField(max_length=50)),
                ('fechaPago', models.DateTimeField(blank=True, null=True)),
                ('transactionId', models.CharField(max_length=50)),
                ('notas', models.TextField(blank=True, null=True)),
                ('createdAt', models.DateTimeField(auto_now_add=True)),
                ('pagoMethodId', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='finanzas.metodospago')),
                ('suscriptionId', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='finanzas.suscripciones')),
            ],
        ),
    ]
