# Generated by Django 4.1 on 2026-01-30 13:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("app01", "0007_rename_user_role_users"),
    ]

    operations = [
        migrations.CreateModel(
            name="DetectionFeedback",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "source_type",
                    models.CharField(
                        choices=[
                            ("MULTI", "多模型实验室"),
                            ("PAD", "病虫害检测"),
                            ("SHAPE", "品相分级"),
                        ],
                        max_length=10,
                        verbose_name="来源功能",
                    ),
                ),
                ("record_id", models.IntegerField(verbose_name="检测记录ID")),
                (
                    "is_correct",
                    models.BooleanField(default=True, verbose_name="结果是否准确"),
                ),
                (
                    "correct_label",
                    models.CharField(
                        blank=True, max_length=100, verbose_name="纠正标签"
                    ),
                ),
                ("comment", models.TextField(blank=True, verbose_name="补充说明")),
                ("submit_time", models.DateTimeField(auto_now_add=True)),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="app01.userinfo",
                        verbose_name="反馈用户",
                    ),
                ),
            ],
            options={
                "verbose_name": "检测反馈",
                "verbose_name_plural": "检测反馈",
            },
        ),
    ]
