# Generated by Django 6.0.4 on 2026-05-09 08:18

from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("problem", "0008_alter_problem_unique_together_and_more"),
        ("problemset", "0007_problemset_end_time"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name="problemsetproblem",
            unique_together=set(),
        ),
        migrations.AlterUniqueTogether(
            name="problemsetprogress",
            unique_together=set(),
        ),
        migrations.AlterUniqueTogether(
            name="userbadge",
            unique_together=set(),
        ),
        migrations.AlterField(
            model_name="problemset",
            name="status",
            field=models.TextField(choices=[("draft", "Draft"), ("active", "Active"), ("archived", "Archived")], default="draft", verbose_name="状态"),
        ),
        migrations.AlterField(
            model_name="problemset",
            name="difficulty",
            field=models.TextField(choices=[("Easy", "Easy"), ("Medium", "Medium"), ("Hard", "Hard")], default="Easy", verbose_name="难度等级"),
        ),
        migrations.AlterField(
            model_name="problemsetbadge",
            name="condition_type",
            field=models.TextField(choices=[("all_problems", "All Problems"), ("problem_count", "Problem Count"), ("score", "Score")], verbose_name="获得条件类型"),
        ),
        migrations.AddConstraint(
            model_name="problemsetproblem",
            constraint=models.UniqueConstraint(fields=("problemset", "problem"), name="unique_problemset_problem"),
        ),
        migrations.AddConstraint(
            model_name="problemsetprogress",
            constraint=models.UniqueConstraint(fields=("problemset", "user"), name="unique_problemset_progress_user"),
        ),
        migrations.AddConstraint(
            model_name="userbadge",
            constraint=models.UniqueConstraint(fields=("user", "badge"), name="unique_user_badge"),
        ),
    ]
