# Generated by Django 6.0.1 on 2026-02-10 19:20

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


class Migration(migrations.Migration):

    dependencies = [
        ('shop', '0021_commissionlog_distributor_order_distributor_and_more'),
    ]

    operations = [
        migrations.AddField(
            model_name='vbcourse',
            name='content',
            field=models.TextField(blank=True, help_text='支持Markdown或HTML', verbose_name='详细内容'),
        ),
        migrations.AddField(
            model_name='vbcourse',
            name='price',
            field=models.DecimalField(decimal_places=2, default=0, help_text='0表示免费', max_digits=10, verbose_name='价格'),
        ),
        migrations.CreateModel(
            name='CourseEnrollment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer_name', models.CharField(max_length=100, verbose_name='姓名')),
                ('phone_number', models.CharField(max_length=20, verbose_name='联系电话')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='电子邮箱')),
                ('wechat_id', models.CharField(blank=True, max_length=50, verbose_name='微信号')),
                ('message', models.TextField(blank=True, verbose_name='留言/备注')),
                ('status', models.CharField(choices=[('pending', '待联系'), ('contacted', '已联系'), ('completed', '已完成'), ('cancelled', '已取消')], default='pending', max_length=20, verbose_name='状态')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='提交时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='enrollments', to='shop.vbcourse', verbose_name='咨询课程')),
                ('distributor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.distributor', verbose_name='所属分销员')),
                ('salesperson', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.salesperson', verbose_name='所属销售员')),
            ],
            options={
                'verbose_name': '课程报名',
                'verbose_name_plural': '课程报名管理',
            },
        ),
    ]
