# Generated by Django 5.2.10 on 2026-03-24 08:28

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name="PulseWeightConfig",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("name", models.CharField(max_length=100, verbose_name="配置名称")),
                (
                    "is_active",
                    models.BooleanField(db_index=True, default=True, verbose_name="是否激活"),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "db_table": "pulse_weight_config",
            },
        ),
        migrations.CreateModel(
            name="PulseIndicatorWeight",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("indicator_code", models.CharField(max_length=50, verbose_name="指标代码")),
                ("dimension", models.CharField(max_length=20, verbose_name="维度")),
                ("weight", models.FloatField(default=1.0, verbose_name="权重")),
                ("is_enabled", models.BooleanField(default=True, verbose_name="是否启用")),
                (
                    "config",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="weights",
                        to="pulse.pulseweightconfig",
                    ),
                ),
            ],
            options={
                "db_table": "pulse_indicator_weight",
            },
        ),
    ]
