# Generated by Django 4.1.7 on 2023-04-08 09:56

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Billing',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('currency', models.CharField(default='VND', max_length=3)),
                ('pay_at', models.DateTimeField(blank=True, null=True)),
                ('reference_number', models.CharField(blank=True, help_text='Reference number from payment gateway', max_length=100, null=True)),
                ('status', models.CharField(choices=[('NEW', 'NEW'), ('CONFIRMED', 'CONFIRMED')], default='NEW', max_length=20)),
                ('result_payment', models.CharField(choices=[('VNPAY_00', 'VNPAY SUCCESS'), ('VNPAY_05', 'VNPAY BAD_PASSWORD_EXCEEDING'), ('VNPAY_06', 'VNPAY WRONG_PASSWORD'), ('VNPAY_07', 'VNPAY SUSPICIOUS_TRANSACTION'), ('VNPAY_12', 'VNPAY CARD_IS_LOCKED'), ('VNPAY_09', 'VNPAY NO_INTERNET_BANKING'), ('VNPAY_10', 'VNPAY VERIFICATION_EXCEEDING'), ('VNPAY_11', 'VNPAY TIMEOUT_PAYMENT'), ('VNPAY_24', 'VNPAY CUSTOMER_CANCEL'), ('VNPAY_51', 'VNPAY NOT_ENOUGH_BALANCE'), ('VNPAY_65', 'VNPAY TRANSACTION_PER_DAY_EXCEEDING'), ('VNPAY_75', 'VNPAY BANK_MAINTENANCE'), ('VNPAY_99', 'VNPAY OTHER_ERRORS')], max_length=50, null=True)),
                ('is_paid', models.BooleanField(default=False)),
                ('transaction_id', models.CharField(blank=True, max_length=255, null=True)),
                ('pay_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
