# Generated by Django 3.1.10 on 2021-06-24 23:56

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django_cryptography.fields


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CreditCard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', django_cryptography.fields.encrypt(models.CharField(max_length=19, validators=[django.core.validators.RegexValidator('^[\\d]*$', 'You only can use numbers in this field'), django.core.validators.MinLengthValidator(16)], verbose_name='Number'))),
                ('franchise', models.CharField(choices=[('Visa', 'Visa'), ('MasterCard', 'Mastercard'), ('American Express', 'American Express'), ('Diners Club', 'Diners Club')], max_length=255, verbose_name='Franchise')),
                ('due_date_year', models.PositiveSmallIntegerField(verbose_name='Due date year')),
                ('due_date_month', models.PositiveSmallIntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(12)], verbose_name='Due date month')),
                ('verification_code', django_cryptography.fields.encrypt(models.CharField(max_length=4, validators=[django.core.validators.RegexValidator('^[\\d]*$', 'You only can use numbers in this field'), django.core.validators.MinLengthValidator(3)], verbose_name='Verification code'))),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'Credit card',
                'verbose_name_plural': 'Credit cards',
            },
        ),
    ]
