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

from django.db import migrations, models


class Migration(migrations.Migration):

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

    operations = [
        migrations.SeparateDatabaseAndState(
            database_operations=[],
            state_operations=[
        migrations.CreateModel(
            name="FundTypePreferenceConfigModel",
            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",
                    ),
                ),
                ("fund_type", models.CharField(max_length=50, verbose_name="基金类型")),
                (
                    "style",
                    models.CharField(
                        blank=True,
                        help_text="如：成长、价值、平衡、商品等",
                        max_length=50,
                        verbose_name="基金风格",
                    ),
                ),
                ("is_active", models.BooleanField(default=True, verbose_name="是否启用")),
                ("priority", models.IntegerField(default=0, 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_fund_type_preference",
                "indexes": [
                    models.Index(
                        fields=["regime", "is_active"], name="config_fund_regime_31442b_idx"
                    )
                ],
                "unique_together": {("regime", "fund_type", "style")},
            },
        ),
            ],
        ),
    ]
