# Generated by Django 5.1.9 on 2025-06-06 02:55

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


class Migration(migrations.Migration):

    dependencies = [
        ("access", "0012_teamusers_model_notes_alter_teamusers_id_and_more"),
        ("core", "0028_delete_history"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="manufacturer",
            name="is_global",
        ),
        migrations.RemoveField(
            model_name="manufacturer",
            name="slug",
        ),
        migrations.AlterField(
            model_name="manufacturer",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.AlterField(
            model_name="manufacturer",
            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.CreateModel(
            name="ManufacturerAuditHistory",
            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="core.manufacturer",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Manufacturer History",
                "verbose_name_plural": "Manufacturer Histories",
                "db_table": "core_manufacturer_audithistory",
                "managed": True,
            },
            bases=("core.centurionaudit", models.Model),
        ),
        migrations.CreateModel(
            name="ManufacturerCenturionModelNote",
            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="core.manufacturer",
                        verbose_name="Model",
                    ),
                ),
            ],
            options={
                "verbose_name": "Manufacturer Note",
                "verbose_name_plural": "Manufacturer Notes",
                "db_table": "core_manufacturer_centurionmodelnote",
                "managed": True,
            },
            bases=("core.centurionmodelnote", models.Model),
        ),
    ]
