# Generated by Django 5.1.6 on 2026-07-31 17:07

import django.core.validators
import uuid
from decimal import Decimal
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0009_usersubscription'),
    ]

    operations = [
        migrations.CreateModel(
            name='PaymentGateway',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('provider', models.CharField(choices=[('stripe', 'Stripe'), ('paystack', 'Paystack'), ('flutterwave', 'Flutterwave'), ('btc', 'Bitcoin'), ('usdt', 'USDT (TRC20)'), ('bank', 'Bank Transfer'), ('manual', 'Manual / Offline')], max_length=32, unique=True)),
                ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive'), ('maintenance', 'Under Maintenance')], default='active', max_length=20)),
                ('logo', models.ImageField(blank=True, null=True, upload_to='gateways/')),
                ('description', models.TextField(blank=True)),
                ('display_order', models.PositiveIntegerField(default=10)),
                ('public_key', models.CharField(blank=True, max_length=255)),
                ('secret_key', models.CharField(blank=True, max_length=255)),
                ('webhook_secret', models.CharField(blank=True, max_length=255)),
                ('is_test_mode', models.BooleanField(default=True)),
                ('min_amount', models.DecimalField(decimal_places=2, default=Decimal('1.00'), max_digits=12, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))])),
                ('max_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('fixed_fee', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=10)),
                ('percentage_fee', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5)),
                ('config', models.JSONField(blank=True, default=dict)),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Payment Gateway',
                'verbose_name_plural': 'Payment Gateways',
                'ordering': ['display_order', 'name'],
            },
        ),
    ]
