# Generated by Django 3.1.3 on 2020-11-14 17:56

import django.contrib.postgres.indexes
from django.db import migrations, models
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('email', models.EmailField(db_index=True, max_length=254, unique=True)),
                ('time_zone', models.CharField(default='UTC', max_length=100)),
                ('is_active', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('country_name', models.CharField(default='Russia', max_length=30)),
                ('country_code', models.CharField(default='Ru', max_length=10)),
                ('country_phone_code', models.CharField(default='+7', max_length=10)),
                ('cellphone', models.CharField(blank=True, max_length=25, null=True, unique=True)),
                ('phone_verification_code', models.SmallIntegerField(default=0, null=True)),
                ('phone_code_valid', models.BooleanField(default=False)),
                ('use_country_code', models.BooleanField(default=True)),
                ('mobile_device', models.BooleanField(default=True)),
                ('signed_up', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Device',
            fields=[
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('device', models.CharField(default='', max_length=250)),
                ('device_type', models.PositiveSmallIntegerField(choices=[(0, 'iOS'), (1, 'Android'), (2, 'WEB')], default=0)),
            ],
            options={
                'ordering': ['-created_at', '-updated_at'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SMSLog',
            fields=[
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user_uuid', models.UUIDField(blank=True, editable=False, null=True)),
            ],
            options={
                'ordering': ['-created_at', '-updated_at'],
                'abstract': False,
            },
        ),
        migrations.AddIndex(
            model_name='smslog',
            index=django.contrib.postgres.indexes.BrinIndex(fields=['created_at'], name='authenticat_created_d8b88c_brin'),
        ),
        migrations.AddIndex(
            model_name='device',
            index=django.contrib.postgres.indexes.BrinIndex(fields=['created_at'], name='authenticat_created_7c92f6_brin'),
        ),
        migrations.AddField(
            model_name='user',
            name='devices',
            field=models.ManyToManyField(blank=True, related_name='registered_user_devices', to='authentication.Device'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=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'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=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'),
        ),
    ]
