# Generated by Django 4.2.1 on 2023-07-26 21:03

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


class Migration(migrations.Migration):
    dependencies = [
        ("gameui", "0026_alter_defense_access_code_and_more"),
    ]

    operations = [
        migrations.RenameField(
            model_name="defense",
            old_name="is_valid",
            new_name="access_code_output_correct",
        ),
        migrations.RemoveField(
            model_name="account",
            name="flagged",
        ),
        migrations.RemoveField(
            model_name="defense",
            name="flagged",
        ),
        migrations.CreateModel(
            name="Flag",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("resolution_text", models.TextField(blank=True, null=True)),
                ("reviewed_by_admin", models.BooleanField(default=False)),
                (
                    "report_source",
                    models.CharField(
                        choices=[
                            ("admin", "Admin"),
                            ("user", "User"),
                            ("automatic", "Automatic"),
                        ],
                        default="automatic",
                        max_length=20,
                    ),
                ),
                ("metadata", models.JSONField(blank=True, null=True)),
                ("timestamp", models.DateTimeField(auto_now_add=True)),
                (
                    "authattempt",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="gameui.authattempt",
                    ),
                ),
                (
                    "defense",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="gameui.defense",
                    ),
                ),
                (
                    "flagger",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="gameui.account",
                    ),
                ),
            ],
        ),
    ]
