# Generated by Django 5.2.7 on 2026-06-02 09:35

import django.core.validators
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("users", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="customuser",
            name="account_locked_until",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="customuser",
            name="is_celebrity",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="customuser",
            name="is_locked",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="customuser",
            name="is_verified",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="customuser",
            name="profile_completed",
            field=models.BooleanField(default=False),
        ),
        migrations.CreateModel(
            name="IdentityVerification",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("pending", "Pending"),
                            ("approved", "Approved"),
                            ("rejected", "Rejected"),
                            ("needs_more_information", "Needs more information"),
                        ],
                        default="pending",
                        max_length=32,
                    ),
                ),
                ("submitted_at", models.DateTimeField(auto_now_add=True)),
                ("reviewed_at", models.DateTimeField(blank=True, null=True)),
                ("rejection_reason", models.TextField(blank=True)),
                (
                    "government_id",
                    models.FileField(
                        blank=True, null=True, upload_to="verification/documents/"
                    ),
                ),
                (
                    "selfie_image",
                    models.ImageField(
                        blank=True, null=True, upload_to="verification/selfies/"
                    ),
                ),
                ("additional_notes", models.TextField(blank=True)),
                ("is_active", models.BooleanField(default=True)),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="verifications",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-submitted_at"],
            },
        ),
        migrations.CreateModel(
            name="Profile",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("display_name", models.CharField(blank=True, max_length=120)),
                ("headline", models.CharField(blank=True, max_length=200)),
                ("bio", models.TextField(blank=True)),
                ("pronouns", models.CharField(blank=True, max_length=50)),
                (
                    "gender",
                    models.CharField(
                        choices=[
                            ("female", "Female"),
                            ("male", "Male"),
                            ("nonbinary", "Non-binary"),
                            ("other", "Other"),
                            ("prefer_not_to_say", "Prefer not to say"),
                        ],
                        default="prefer_not_to_say",
                        max_length=32,
                    ),
                ),
                ("birth_date", models.DateField(blank=True, null=True)),
                (
                    "phone_number",
                    models.CharField(
                        blank=True,
                        max_length=17,
                        validators=[
                            django.core.validators.RegexValidator(
                                message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.",
                                regex="^\\+?1?\\d{9,15}$",
                            )
                        ],
                    ),
                ),
                ("city", models.CharField(blank=True, max_length=128)),
                ("state", models.CharField(blank=True, max_length=128)),
                ("country", models.CharField(blank=True, max_length=128)),
                (
                    "latitude",
                    models.DecimalField(
                        blank=True, decimal_places=6, max_digits=9, null=True
                    ),
                ),
                (
                    "longitude",
                    models.DecimalField(
                        blank=True, decimal_places=6, max_digits=9, null=True
                    ),
                ),
                ("timezone", models.CharField(blank=True, max_length=64)),
                ("interests", models.JSONField(blank=True, default=list)),
                ("social_links", models.JSONField(blank=True, default=dict)),
                (
                    "visibility",
                    models.CharField(
                        choices=[
                            ("public", "Public"),
                            ("discoverable", "Discoverable"),
                            ("private", "Private"),
                        ],
                        default="discoverable",
                        max_length=32,
                    ),
                ),
                ("can_receive_messages", models.BooleanField(default=True)),
                (
                    "verification_requested_at",
                    models.DateTimeField(blank=True, null=True),
                ),
                ("location_updated_at", models.DateTimeField(blank=True, null=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="profile",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "indexes": [
                    models.Index(
                        fields=["visibility"], name="users_profi_visibil_054706_idx"
                    ),
                    models.Index(
                        fields=["city", "state", "country"],
                        name="users_profi_city_63cb45_idx",
                    ),
                ],
            },
        ),
    ]
