# Generated by Django 6.0.1 on 2026-02-11 06:57

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


class Migration(migrations.Migration):

    dependencies = [
        ('community', '0002_topic_related_course_topic_related_service_and_more'),
    ]

    operations = [
        migrations.AlterField(
            model_name='reply',
            name='content',
            field=models.TextField(help_text='支持Markdown格式', verbose_name='回复内容'),
        ),
        migrations.AlterField(
            model_name='topic',
            name='content',
            field=models.TextField(help_text='支持Markdown格式，支持插入图片', verbose_name='内容'),
        ),
        migrations.CreateModel(
            name='TopicMedia',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='community/media/', verbose_name='文件')),
                ('media_type', models.CharField(choices=[('image', '图片'), ('video', '视频'), ('file', '文件')], default='image', max_length=10, verbose_name='媒体类型')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='上传时间')),
                ('reply', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='media', to='community.reply', verbose_name='所属回复')),
                ('topic', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='media', to='community.topic', verbose_name='所属帖子')),
            ],
            options={
                'verbose_name': '论坛媒体资源',
                'verbose_name_plural': '论坛媒体资源管理',
            },
        ),
    ]
