# Generated by Django 2.2.26 on 2022-10-12 14:53

import uuid

from django.db import migrations, models

import authentic2.utils.misc
import authentic2.validators


class Migration(migrations.Migration):
    dependencies = [
        ('authentic2', '0044_auto_20220530_1426'),
    ]

    operations = [
        migrations.CreateModel(
            name='SMSCode',
            fields=[
                (
                    'id',
                    models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
                ),
                (
                    'value',
                    models.CharField(
                        default=authentic2.utils.sms.create_sms_code,
                        editable=False,
                        max_length=32,
                        verbose_name='Identifier',
                    ),
                ),
                ('kind', models.CharField(max_length=32, verbose_name='Kind')),
                (
                    'phone',
                    models.CharField(
                        blank=True,
                        max_length=64,
                        null=True,
                        validators=[authentic2.validators.PhoneNumberValidator],
                        verbose_name='phone number',
                    ),
                ),
                ('url_token', models.UUIDField(default=uuid.uuid4, verbose_name='URL token')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Creation date')),
                ('expires', models.DateTimeField(verbose_name='Expires')),
                ('sent', models.BooleanField(default=False, verbose_name='SMS code sent')),
            ],
        ),
    ]
