# Generated by Django 5.2.9 on 2025-12-29 07:46

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="PolicyLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("event_date", models.DateField(db_index=True)),
                (
                    "level",
                    models.CharField(
                        choices=[
                            ("P0", "P0 - 常态"),
                            ("P1", "P1 - 预警"),
                            ("P2", "P2 - 干预"),
                            ("P3", "P3 - 危机"),
                        ],
                        max_length=2,
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                ("evidence_url", models.URLField(max_length=500)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
            ],
            options={
                "db_table": "policy_log",
                "ordering": ["-event_date"],
            },
        ),
    ]
