# Generated by Django 5.2.4 on 2025-08-29 23:09

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


class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("core", "0003_rfid_data_rfid_key_a_verified_rfid_key_b_verified"),
    ]

    operations = [
        migrations.CreateModel(
            name="UserDatum",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("object_id", models.PositiveIntegerField()),
                ("created_on", models.DateTimeField(auto_now_add=True)),
                (
                    "content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.contenttype",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "User Datum",
                "verbose_name_plural": "User Data",
                "unique_together": {("user", "content_type", "object_id")},
            },
        ),
        migrations.CreateModel(
            name="EmailInbox",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                (
                    "username",
                    models.CharField(
                        max_length=255,
                        help_text="Login name for the mailbox",
                    ),
                ),
                (
                    "host",
                    models.CharField(
                        max_length=255,
                        help_text=(
                            "Examples: Gmail IMAP 'imap.gmail.com', Gmail POP3 'pop.gmail.com',"
                            " GoDaddy IMAP 'imap.secureserver.net', GoDaddy POP3 'pop.secureserver.net'"
                        ),
                    ),
                ),
                (
                    "port",
                    models.PositiveIntegerField(
                        default=993,
                        help_text=(
                            "Common ports: Gmail IMAP 993, Gmail POP3 995, "
                            "GoDaddy IMAP 993, GoDaddy POP3 995"
                        ),
                    ),
                ),
                ("password", models.CharField(max_length=255)),
                (
                    "protocol",
                    models.CharField(
                        choices=[("imap", "IMAP"), ("pop3", "POP3")],
                        default="imap",
                        help_text=(
                            "IMAP keeps emails on the server for access across devices; "
                            "POP3 downloads messages to a single device and may remove them from the server"
                        ),
                        max_length=5,
                    ),
                ),
                ("use_ssl", models.BooleanField(default=True)),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="email_inboxes",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "Email Inbox",
                "verbose_name_plural": "Email Inboxes",
            },
        ),
    ]
