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

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("asset_analysis", "0003_assetpoolconfig_assetpoolentry"),
    ]

    operations = [
        migrations.SeparateDatabaseAndState(
            database_operations=[],
            state_operations=[
        migrations.CreateModel(
            name="AssetConfigModel",
            fields=[
                (
                    "asset_class",
                    models.CharField(
                        max_length=50,
                        primary_key=True,
                        serialize=False,
                        unique=True,
                        verbose_name="资产类别代码",
                    ),
                ),
                ("display_name", models.CharField(max_length=100, verbose_name="显示名称")),
                (
                    "ticker_symbol",
                    models.CharField(
                        help_text="如 000300.SH", max_length=20, verbose_name="交易代码"
                    ),
                ),
                (
                    "data_source",
                    models.CharField(default="tushare", max_length=20, verbose_name="数据源"),
                ),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("equity", "股票"),
                            ("bond", "债券"),
                            ("commodity", "商品"),
                            ("cash", "现金"),
                        ],
                        max_length=20,
                        verbose_name="资产分类",
                    ),
                ),
                ("is_active", models.BooleanField(default=True, verbose_name="是否启用")),
                ("description", models.TextField(blank=True, verbose_name="描述")),
                ("created_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")),
                ("updated_at", models.DateTimeField(auto_now=True, verbose_name="更新时间")),
            ],
            options={
                "verbose_name": "资产类别配置",
                "verbose_name_plural": "资产类别配置",
                "db_table": "asset_config",
            },
        ),
            ],
        ),
    ]
