# Generated by Django 5.2.10 on 2026-03-04 13:39

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("equity", "0002_scoring_weight_config"),
    ]

    operations = [
        migrations.CreateModel(
            name="StockPoolSnapshot",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("stock_codes", models.JSONField(default=list, verbose_name="股票代码列表")),
                ("regime", models.CharField(max_length=20, verbose_name="筛选时使用的 Regime")),
                ("as_of_date", models.DateField(verbose_name="数据截止日期")),
                ("is_active", models.BooleanField(default=True, verbose_name="是否为当前活跃池")),
                ("count", models.IntegerField(default=0, verbose_name="股票数量")),
                ("avg_roe", models.FloatField(blank=True, null=True, verbose_name="平均 ROE")),
                ("avg_pe", models.FloatField(blank=True, null=True, verbose_name="平均 PE")),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
            ],
            options={
                "verbose_name": "股票池快照",
                "verbose_name_plural": "股票池快照",
                "db_table": "equity_stock_pool_snapshot",
                "ordering": ["-created_at"],
                "indexes": [
                    models.Index(fields=["-created_at"], name="equity_stoc_created_7cd20b_idx"),
                    models.Index(fields=["is_active"], name="equity_stoc_is_acti_4155f3_idx"),
                ],
            },
        ),
    ]
