# Generated by Django 5.1.6 on 2025-03-06 16:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('display', models.IntegerField(unique=True)),
                ('title', models.CharField(max_length=100)),
                ('content', models.TextField()),
                ('task_type', models.CharField(choices=[('challenge', 'Challenge'), ('tutorial', 'Tutorial')], editable=False, max_length=20)),
                ('is_public', models.BooleanField(default=False)),
            ],
            options={
                'get_latest_by': 'modified',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Challenge',
            fields=[
                ('task_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='task.task')),
                ('score', models.IntegerField(default=0)),
            ],
            options={
                'verbose_name': '挑战',
                'verbose_name_plural': '挑战',
                'ordering': ('display',),
            },
            bases=('task.task',),
        ),
        migrations.CreateModel(
            name='Tutorial',
            fields=[
                ('task_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='task.task')),
            ],
            options={
                'verbose_name': '教程',
                'verbose_name_plural': '教程',
                'ordering': ('display',),
            },
            bases=('task.task',),
        ),
    ]
