# Generated by Django 5.1.10 on 2025-08-15 03:21

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


class Migration(migrations.Migration):

    dependencies = [
        ("access", "0010_company_alter_entity_entity_type_alter_person_dob_and_more"),
        ("core", "0024_centurionaudit_centurionmodelnote_and_more"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.RemoveField(
            model_name="entity",
            name="is_global",
        ),
        migrations.RemoveField(
            model_name="tenant",
            name="slug",
        ),
        migrations.AlterField(
            model_name="entity",
            name="id",
            field=models.AutoField(
                help_text="ID of the item",
                primary_key=True,
                serialize=False,
                unique=True,
                verbose_name="ID",
            ),
        ),
        migrations.AlterField(
            model_name="entity",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.AlterField(
            model_name="entity",
            name="organization",
            field=models.ForeignKey(
                help_text="Tenant this belongs to",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="access.tenant",
                validators=[
                    access.models.tenancy_abstract.TenancyAbstractModel.validatate_organization_exists
                ],
                verbose_name="Tenant",
            ),
        ),
        migrations.AlterField(
            model_name="role",
            name="id",
            field=models.AutoField(
                help_text="ID of the item",
                primary_key=True,
                serialize=False,
                unique=True,
                verbose_name="ID",
            ),
        ),
        migrations.AlterField(
            model_name="role",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.AlterField(
            model_name="role",
            name="organization",
            field=models.ForeignKey(
                help_text="Tenant this belongs to",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="access.tenant",
                validators=[
                    access.models.tenancy_abstract.TenancyAbstractModel.validatate_organization_exists
                ],
                verbose_name="Tenant",
            ),
        ),
        migrations.AlterField(
            model_name="tenant",
            name="manager",
            field=models.ForeignKey(
                blank=True,
                help_text="Manager for this Tenancy",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to=settings.AUTH_USER_MODEL,
                verbose_name="Manager",
            ),
        ),
        migrations.AlterField(
            model_name="tenant",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.CreateModel(
            name="CompanyAuditHistory",
            fields=[
                (
                    "centurionaudit_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionaudit",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this history belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.company",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Company History",
                "verbose_name_plural": "Company Histories",
                "db_table": "access_company_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="CompanyCenturionModelNote",
            fields=[
                (
                    "centurionmodelnote_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionmodelnote",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this note belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.company",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Company Note",
                "verbose_name_plural": "Company Notes",
                "db_table": "access_company_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="ContactAuditHistory",
            fields=[
                (
                    "centurionaudit_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionaudit",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this history belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.contact",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Contact History",
                "verbose_name_plural": "Contact Histories",
                "db_table": "access_contact_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="ContactCenturionModelNote",
            fields=[
                (
                    "centurionmodelnote_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionmodelnote",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this note belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.contact",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Contact Note",
                "verbose_name_plural": "Contact Notes",
                "db_table": "access_contact_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="EntityAuditHistory",
            fields=[
                (
                    "centurionaudit_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionaudit",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this history belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="audit_history",
                        to="access.entity",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Entity History",
                "verbose_name_plural": "Entity Histories",
                "db_table": "access_entity_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="EntityCenturionModelNote",
            fields=[
                (
                    "centurionmodelnote_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionmodelnote",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this note belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.entity",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Entity Note",
                "verbose_name_plural": "Entity Notes",
                "db_table": "access_entity_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="PersonAuditHistory",
            fields=[
                (
                    "centurionaudit_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionaudit",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this history belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.person",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Person History",
                "verbose_name_plural": "Person Histories",
                "db_table": "access_person_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="PersonCenturionModelNote",
            fields=[
                (
                    "centurionmodelnote_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionmodelnote",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this note belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.person",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Person Note",
                "verbose_name_plural": "Person Notes",
                "db_table": "access_person_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="RoleAuditHistory",
            fields=[
                (
                    "centurionaudit_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionaudit",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this history belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="audit_history",
                        to="access.role",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Role History",
                "verbose_name_plural": "Role Histories",
                "db_table": "access_role_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="RoleCenturionModelNote",
            fields=[
                (
                    "centurionmodelnote_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionmodelnote",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this note belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.role",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Role Note",
                "verbose_name_plural": "Role Notes",
                "db_table": "access_role_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.CreateModel(
            name="TenantAuditHistory",
            fields=[
                (
                    "centurionaudit_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionaudit",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this history belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="audit_history",
                        to="access.tenant",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Tenant History",
                "verbose_name_plural": "Tenant Histories",
                "db_table": "access_tenant_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit",),
        ),
        migrations.CreateModel(
            name="TenantCenturionModelNote",
            fields=[
                (
                    "centurionmodelnote_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.centurionmodelnote",
                    ),
                ),
                (
                    "model",
                    models.ForeignKey(
                        help_text="Model this note belongs to",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="access.tenant",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Tenant Note",
                "verbose_name_plural": "Tenant Notes",
                "db_table": "access_tenant_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote",),
        ),
        migrations.DeleteModel(
            name="EntityHistory",
        ),
        migrations.DeleteModel(
            name="EntityNotes",
        ),
        migrations.DeleteModel(
            name="RoleHistory",
        ),
        migrations.DeleteModel(
            name="RoleNotes",
        ),
    ]
