# Generated by Django 5.2.9 on 2025-12-31 07:09

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("account", "0004_capitalflowmodel"),
    ]

    operations = [
        migrations.CreateModel(
            name="DocumentationModel",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                    ),
                ),
                ("title", models.CharField(max_length=200, verbose_name="标题")),
                ("slug", models.SlugField(max_length=100, unique=True, verbose_name="URL标识")),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("user_guide", "用户指南"),
                            ("concept", "概念说明"),
                            ("api", "API 文档"),
                            ("development", "开发文档"),
                            ("other", "其他"),
                        ],
                        default="user_guide",
                        max_length=20,
                        verbose_name="分类",
                    ),
                ),
                ("content", models.TextField(verbose_name="内容（Markdown）")),
                ("summary", models.TextField(blank=True, verbose_name="摘要")),
                ("order", models.IntegerField(default=0, verbose_name="排序（数字越小越靠前）")),
                ("is_published", models.BooleanField(default=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": "documentation",
                "ordering": ["order", "-created_at"],
                "indexes": [
                    models.Index(
                        fields=["slug", "is_published"], name="documentati_slug_bf55ba_idx"
                    ),
                    models.Index(
                        fields=["category", "is_published"], name="documentati_categor_4ca02c_idx"
                    ),
                ],
            },
        ),
    ]
