# Generated by Django 4.2 on 2023-08-28 06:32

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="VerificationToken",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("created_date", models.DateTimeField(auto_now_add=True, verbose_name="Created date")),
                ("update_date", models.DateTimeField(auto_now=True, verbose_name="Update date")),
                ("token", models.CharField(max_length=6, verbose_name="Token")),
                (
                    "token_type",
                    models.CharField(
                        choices=[("totp", "Totp"), ("hotp", "Hotp")],
                        default="totp",
                        max_length=100,
                        verbose_name="Verify Type",
                    ),
                ),
                ("expire_date", models.DateTimeField(auto_now=True, null=True, verbose_name="Expire date")),
                ("is_active", models.BooleanField(default=True, verbose_name="Is active")),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name="User"
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="UserNotificationPreference",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("created_date", models.DateTimeField(auto_now_add=True, verbose_name="Created date")),
                ("update_date", models.DateTimeField(auto_now=True, verbose_name="Update date")),
                (
                    "notification_type",
                    models.CharField(
                        choices=[("email", "Email"), ("sms", "Sms"), ("authenticator", "Authenticator")],
                        default="email",
                        max_length=100,
                    ),
                ),
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="notification_preference",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="User",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
