# Generated by Django 5.2.10 on 2026-02-03 08:32

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("audit", "0003_indicatorthresholdconfigmodel_validationsummarymodel_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="ConfidenceConfigModel",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "day_0_coefficient",
                    models.FloatField(
                        default=0.6,
                        help_text="数据发布当天的置信度系数",
                        verbose_name="发布当天系数",
                    ),
                ),
                (
                    "day_7_coefficient",
                    models.FloatField(
                        default=0.5,
                        help_text="数据发布1周后的置信度系数",
                        verbose_name="发布1周后系数",
                    ),
                ),
                (
                    "day_14_coefficient",
                    models.FloatField(
                        default=0.4,
                        help_text="数据发布2周后的置信度系数",
                        verbose_name="发布2周后系数",
                    ),
                ),
                (
                    "day_30_coefficient",
                    models.FloatField(
                        default=0.3,
                        help_text="数据发布1个月后的置信度系数",
                        verbose_name="发布1月后系数",
                    ),
                ),
                (
                    "daily_data_bonus",
                    models.FloatField(
                        default=0.2,
                        help_text="有日度数据支持时的置信度加成",
                        verbose_name="日度数据加成",
                    ),
                ),
                (
                    "weekly_data_bonus",
                    models.FloatField(
                        default=0.1,
                        help_text="有周度数据支持时的置信度加成",
                        verbose_name="周度数据加成",
                    ),
                ),
                (
                    "daily_consistency_bonus",
                    models.FloatField(
                        default=0.1,
                        help_text="日度数据与月度数据一致时的加成",
                        verbose_name="日度一致性加成",
                    ),
                ),
                (
                    "base_confidence",
                    models.FloatField(
                        default=0.5, help_text="默认的基础置信度", verbose_name="基础置信度"
                    ),
                ),
                (
                    "daily_persist_threshold",
                    models.IntegerField(
                        default=10,
                        help_text="日度信号持续多少天后采用日度信号",
                        verbose_name="日度持续阈值",
                    ),
                ),
                (
                    "hybrid_weight_daily",
                    models.FloatField(
                        default=0.3,
                        help_text="混合模式中日度信号的权重",
                        verbose_name="混合日度权重",
                    ),
                ),
                (
                    "hybrid_weight_monthly",
                    models.FloatField(
                        default=0.7,
                        help_text="混合模式中月度信号的权重",
                        verbose_name="混合月度权重",
                    ),
                ),
                (
                    "decay_threshold",
                    models.FloatField(
                        default=0.2, help_text="F1分数低于此值视为衰减", verbose_name="衰减阈值"
                    ),
                ),
                (
                    "decay_penalty",
                    models.FloatField(
                        default=0.5, help_text="衰减后权重乘以该系数", verbose_name="衰减惩罚系数"
                    ),
                ),
                (
                    "improvement_threshold",
                    models.FloatField(
                        default=0.1, help_text="F1提升超过此值给予奖励", verbose_name="改进阈值"
                    ),
                ),
                (
                    "improvement_bonus",
                    models.FloatField(
                        default=1.2, help_text="改进后权重乘以该系数", verbose_name="改进奖励系数"
                    ),
                ),
                ("description", models.TextField(blank=True, verbose_name="说明")),
                ("is_active", models.BooleanField(default=True, verbose_name="是否启用")),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "置信度配置",
                "verbose_name_plural": "置信度配置",
                "db_table": "audit_confidence_config",
            },
        ),
    ]
