# Generated by Django 4.1 on 2026-01-30 11:05

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


class Migration(migrations.Migration):

    dependencies = [
        ("app01", "0007_rename_user_role_users"),
        ("multi_model_detection", "0003_modelconfig_delete_detectionrecord"),
    ]

    operations = [
        migrations.CreateModel(
            name="OperationRecord",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "operation_type",
                    models.CharField(
                        choices=[
                            ("IMAGE", "图片检测"),
                            ("VIDEO", "视频检测"),
                            ("CAMERA", "实时检测"),
                        ],
                        max_length=20,
                        verbose_name="操作类型",
                    ),
                ),
                ("description", models.TextField(verbose_name="操作描述")),
                (
                    "result_path",
                    models.CharField(
                        blank=True, max_length=255, null=True, verbose_name="结果路径"
                    ),
                ),
                (
                    "create_time",
                    models.DateTimeField(auto_now_add=True, verbose_name="记录时间"),
                ),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="app01.userinfo",
                        verbose_name="用户",
                    ),
                ),
            ],
            options={
                "verbose_name": "操作记录",
                "verbose_name_plural": "操作记录",
            },
        ),
    ]
