# Generated by Django 5.2.1 on 2025-10-29 16:48

import django.contrib.auth.models
import django.db.models.deletion
import django.utils.timezone
import django_countries.fields
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name="Address",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        default=django.utils.timezone.now, editable=False
                    ),
                ),
                ("updated_at", models.DateTimeField(default=django.utils.timezone.now)),
                ("line1", models.CharField(max_length=200)),
                ("line2", models.CharField(max_length=200, null=True)),
                ("line3", models.CharField(max_length=200, null=True)),
                ("city", models.CharField(max_length=200, null=True)),
                ("region", models.CharField(max_length=200)),
                ("postcode", models.CharField(max_length=200, null=True)),
                ("country", django_countries.fields.CountryField(max_length=2)),
            ],
            options={
                "verbose_name_plural": "Addresses",
            },
        ),
        migrations.CreateModel(
            name="Member",
            fields=[
                (
                    "user_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        default=django.utils.timezone.now, editable=False
                    ),
                ),
                ("updated_at", models.DateTimeField(default=django.utils.timezone.now)),
                ("phone", models.CharField(blank=True, max_length=100, null=True)),
                ("profile", models.ImageField(null=True, upload_to="")),
                ("profile_thumbnail", models.ImageField(null=True, upload_to="")),
            ],
            options={
                "verbose_name": "Portal Member",
                "verbose_name_plural": "Portal Members",
            },
            bases=("auth.user", models.Model),
            managers=[
                ("objects", django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name="Feedback",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        default=django.utils.timezone.now, editable=False
                    ),
                ),
                ("updated_at", models.DateTimeField(default=django.utils.timezone.now)),
                ("comments", models.TextField()),
                (
                    "creator",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ichec_django_core.member",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Organization",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(
                        default=django.utils.timezone.now, editable=False
                    ),
                ),
                ("updated_at", models.DateTimeField(default=django.utils.timezone.now)),
                ("name", models.CharField(max_length=200)),
                ("acronym", models.CharField(blank=True, max_length=100, null=True)),
                ("description", models.TextField(blank=True)),
                ("website", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "address",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ichec_django_core.address",
                    ),
                ),
                (
                    "members",
                    models.ManyToManyField(
                        blank=True,
                        related_name="organizations",
                        to="ichec_django_core.member",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
