# Generated by Django 3.2 on 2021-05-19 21:50

from django.db import migrations, models
import django.db.models.deletion
import fernet_fields.fields
import pag.models
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('pag', '0009_userpagina_is_active'),
    ]

    operations = [
        migrations.CreateModel(
            name='AdminPagina',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.EmailField(max_length=254)),
                ('nombre', models.CharField(max_length=50)),
                ('password', fernet_fields.fields.EncryptedTextField()),
                ('telefono', models.IntegerField(blank=True, null=True)),
                ('is_active', models.BooleanField(default=False)),
                ('pagina', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pag.pagina')),
            ],
            options={
                'unique_together': {('pagina', 'email')},
                'index_together': {('pagina', 'email')},
            },
        ),
        migrations.AlterField(
            model_name='codeverificationuser',
            name='code',
            field=models.IntegerField(default=pag.models.random_string),
        ),
        migrations.CreateModel(
            name='TokenAdminPagina',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.CharField(default=uuid.uuid4, max_length=254, unique=True)),
                ('adminPagina', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='pag.adminpagina')),
            ],
        ),
        migrations.CreateModel(
            name='CodeVerificationAdmin',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.IntegerField(default=pag.models.random_string)),
                ('adminPagina', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='pag.adminpagina')),
            ],
        ),
    ]
