# Generated by Django 5.2.7 on 2026-02-12 09:38

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


class Migration(migrations.Migration):
    dependencies = [
        ("epdb", "0015_user_is_reviewer"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="enviformer",
            name="model_status",
        ),
        migrations.RemoveField(
            model_name="mlrelativereasoning",
            name="model_status",
        ),
        migrations.RemoveField(
            model_name="rulebasedrelativereasoning",
            name="model_status",
        ),
        migrations.AddField(
            model_name="epmodel",
            name="model_status",
            field=models.CharField(
                choices=[
                    ("INITIAL", "Initial"),
                    ("INITIALIZING", "Model is initializing."),
                    ("BUILDING", "Model is building."),
                    (
                        "BUILT_NOT_EVALUATED",
                        "Model is built and can be used for predictions, Model is not evaluated yet.",
                    ),
                    ("EVALUATING", "Model is evaluating"),
                    ("FINISHED", "Model has finished building and evaluation."),
                    ("ERROR", "Model has failed."),
                ],
                default="INITIAL",
            ),
        ),
        migrations.AlterField(
            model_name="enviformer",
            name="eval_packages",
            field=models.ManyToManyField(
                blank=True,
                related_name="%(app_label)s_%(class)s_eval_packages",
                to=settings.EPDB_PACKAGE_MODEL,
                verbose_name="Evaluation Packages",
            ),
        ),
        migrations.AlterField(
            model_name="enviformer",
            name="rule_packages",
            field=models.ManyToManyField(
                blank=True,
                related_name="%(app_label)s_%(class)s_rule_packages",
                to=settings.EPDB_PACKAGE_MODEL,
                verbose_name="Rule Packages",
            ),
        ),
        migrations.AlterField(
            model_name="mlrelativereasoning",
            name="eval_packages",
            field=models.ManyToManyField(
                blank=True,
                related_name="%(app_label)s_%(class)s_eval_packages",
                to=settings.EPDB_PACKAGE_MODEL,
                verbose_name="Evaluation Packages",
            ),
        ),
        migrations.AlterField(
            model_name="mlrelativereasoning",
            name="rule_packages",
            field=models.ManyToManyField(
                blank=True,
                related_name="%(app_label)s_%(class)s_rule_packages",
                to=settings.EPDB_PACKAGE_MODEL,
                verbose_name="Rule Packages",
            ),
        ),
        migrations.AlterField(
            model_name="rulebasedrelativereasoning",
            name="eval_packages",
            field=models.ManyToManyField(
                blank=True,
                related_name="%(app_label)s_%(class)s_eval_packages",
                to=settings.EPDB_PACKAGE_MODEL,
                verbose_name="Evaluation Packages",
            ),
        ),
        migrations.AlterField(
            model_name="rulebasedrelativereasoning",
            name="rule_packages",
            field=models.ManyToManyField(
                blank=True,
                related_name="%(app_label)s_%(class)s_rule_packages",
                to=settings.EPDB_PACKAGE_MODEL,
                verbose_name="Rule Packages",
            ),
        ),
        migrations.CreateModel(
            name="PropertyPluginModel",
            fields=[
                (
                    "epmodel_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="epdb.epmodel",
                    ),
                ),
                ("threshold", models.FloatField(default=0.5)),
                ("eval_results", models.JSONField(blank=True, default=dict, null=True)),
                ("multigen_eval", models.BooleanField(default=False)),
                ("plugin_identifier", models.CharField(max_length=255)),
                (
                    "app_domain",
                    models.ForeignKey(
                        blank=True,
                        default=None,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="epdb.applicabilitydomain",
                    ),
                ),
                (
                    "data_packages",
                    models.ManyToManyField(
                        blank=True,
                        related_name="%(app_label)s_%(class)s_data_packages",
                        to=settings.EPDB_PACKAGE_MODEL,
                        verbose_name="Data Packages",
                    ),
                ),
                (
                    "eval_packages",
                    models.ManyToManyField(
                        blank=True,
                        related_name="%(app_label)s_%(class)s_eval_packages",
                        to=settings.EPDB_PACKAGE_MODEL,
                        verbose_name="Evaluation Packages",
                    ),
                ),
                (
                    "rule_packages",
                    models.ManyToManyField(
                        blank=True,
                        related_name="%(app_label)s_%(class)s_rule_packages",
                        to=settings.EPDB_PACKAGE_MODEL,
                        verbose_name="Rule Packages",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("epdb.epmodel",),
        ),
        migrations.AddField(
            model_name="setting",
            name="property_models",
            field=models.ManyToManyField(
                blank=True,
                related_name="settings",
                to="epdb.propertypluginmodel",
                verbose_name="Setting Property Models",
            ),
        ),
        migrations.DeleteModel(
            name="PluginModel",
        ),
    ]
