# Generated by Django 2.2.12 on 2020-05-06 19:49

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


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='phone_number',
            field=models.CharField(blank=True, max_length=17, null=True, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\+?1?\\d{9,15}$')], verbose_name='Phone Number'),
        ),
        migrations.AddField(
            model_name='user',
            name='phone_number_verified',
            field=models.BooleanField(default=False),
        ),
        migrations.CreateModel(
            name='VerificationCode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.IntegerField(verbose_name='Code For SMS or email varification')),
                ('verified', models.BooleanField(default=False, verbose_name='Is Verified? ')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='varification_code_user_set', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'User OTP Verification Codes',
                'verbose_name_plural': 'User OTP Verification Codes',
            },
        ),
    ]
