# Generated by Django 3.0.11 on 2020-12-30 17:06

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('user_id', models.CharField(max_length=36, primary_key=True, serialize=False, unique=True)),
                ('phone_number', models.CharField(max_length=15, unique=True, validators=[django.core.validators.RegexValidator(message='Phone no must be in the format of +99999999. 14 digit allowed', regex='^\\+?1?\\d{9,14}$')])),
                ('deleted', models.BooleanField(default=False)),
                ('suspended', models.BooleanField(default=False)),
                ('disabled', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'User',
                'verbose_name_plural': 'User',
                'db_table': 'users',
            },
            managers=[
                ('objects', accounts.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='PhoneToken',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone_number', models.CharField(max_length=15, validators=[django.core.validators.RegexValidator(message='Phone no must be in the format of +99999999. 14 digit allowed', regex='^\\+?1?\\d{9,14}$')])),
                ('otp', models.CharField(editable=False, max_length=40)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('attempts', models.IntegerField(default=0)),
                ('used', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'OTP Token',
                'verbose_name_plural': 'OTP Tokens',
                'db_table': 'phone_token',
            },
        ),
        migrations.CreateModel(
            name='UserDetails',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('username', models.CharField(max_length=50, unique=True, validators=[django.core.validators.RegexValidator(message='only digits and numbers allowed.', regex='^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$')])),
                ('name', models.CharField(max_length=200)),
                ('profession', models.CharField(max_length=200)),
                ('profile_image', models.TextField(default='')),
                ('bio', models.CharField(blank=True, default='', max_length=250)),
                ('birth_date', models.DateField(default=django.utils.timezone.now)),
                ('private', models.BooleanField(default=False)),
                ('account_verified', models.BooleanField(default=False)),
                ('business_profile', models.BooleanField(default=False)),
                ('show_followers', models.BooleanField(default=True)),
                ('show_following', models.BooleanField(default=True)),
                ('show_posts', models.BooleanField(default=True)),
                ('show_stores', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name': 'user_details',
                'verbose_name_plural': 'user_details',
                'db_table': 'user_details',
            },
        ),
    ]
