# Generated by Django 5.2.12 on 2026-04-26 23:34

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("sector", "0001_initial"),
    ]

    operations = [
        migrations.SeparateDatabaseAndState(
            database_operations=[],
            state_operations=[
        migrations.CreateModel(
            name="SectorPreferenceConfigModel",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                (
                    "regime",
                    models.CharField(
                        db_index=True,
                        help_text="Recovery/Overheat/Stagflation/Deflation",
                        max_length=20,
                        verbose_name="Regime",
                    ),
                ),
                ("sector_name", models.CharField(max_length=50, verbose_name="板块名称")),
                (
                    "weight",
                    models.FloatField(
                        default=0.5,
                        help_text="1.0 表示最强偏好，0.0 表示无偏好",
                        verbose_name="权重（0.0-1.0）",
                    ),
                ),
                ("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": "config_sector_preference",
                "indexes": [
                    models.Index(
                        fields=["regime", "is_active"], name="config_sect_regime_2f148b_idx"
                    )
                ],
                "unique_together": {("regime", "sector_name")},
            },
        ),
            ],
        ),
    ]
