# Generated by Django 6.0 on 2026-04-23 07:31

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


class Migration(migrations.Migration):

    dependencies = [
        ('tutorial', '0003_alter_tutorial_code'),
    ]

    operations = [
        migrations.CreateModel(
            name='Exercise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('mcq', '选择题'), ('sort', '代码排序')], max_length=16)),
                ('data', models.JSONField()),
                ('order', models.IntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('tutorial', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='exercises', to='tutorial.tutorial')),
            ],
            options={
                'db_table': 'exercise',
                'ordering': ['order', 'created_at'],
            },
        ),
    ]
