# Generated by Django 3.2.23 on 2025-11-28 06:13

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.URLField(verbose_name='图片URL')),
                ('link', models.CharField(blank=True, max_length=200, null=True, verbose_name='跳转链接')),
                ('sort_order', models.IntegerField(default=0, verbose_name='排序')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否启用')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
                'ordering': ['sort_order'],
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='分类名称')),
                ('color', models.CharField(help_text='例如: bg-blue-100 text-blue-600', max_length=50, verbose_name='颜色类名')),
            ],
            options={
                'verbose_name': '课程分类',
                'verbose_name_plural': '课程分类',
            },
        ),
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.CharField(max_length=10, verbose_name='面额')),
                ('unit', models.CharField(default='元', max_length=10, verbose_name='单位')),
                ('title', models.CharField(max_length=50, verbose_name='优惠券标题')),
                ('desc', models.CharField(max_length=100, verbose_name='描述')),
                ('expiry', models.DateField(verbose_name='过期时间')),
                ('status', models.CharField(choices=[('available', '可领取'), ('claimed', '已领取'), ('used', '已使用'), ('expired', '已过期')], default='available', max_length=20, verbose_name='状态')),
                ('color', models.CharField(default='from-blue-500 to-cyan-400', max_length=100, verbose_name='渐变色类名')),
                ('bgStart', models.CharField(default='from-blue-50', max_length=50, verbose_name='背景起始色')),
                ('bgEnd', models.CharField(default='to-cyan-50', max_length=50, verbose_name='背景结束色')),
                ('shadow', models.CharField(default='shadow-blue-100', max_length=50, verbose_name='阴影类名')),
            ],
            options={
                'verbose_name': '优惠券',
                'verbose_name_plural': '优惠券',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='学员姓名')),
                ('phone', models.CharField(max_length=20, verbose_name='联系电话')),
                ('age', models.IntegerField(blank=True, null=True, verbose_name='年龄')),
                ('education', models.CharField(blank=True, max_length=50, null=True, verbose_name='学历')),
                ('address', models.CharField(blank=True, max_length=200, null=True, verbose_name='地址')),
                ('avatar', models.URLField(default='https://images.unsplash.com/photo-1535713875002-d1d0cf377fde', verbose_name='头像URL')),
                ('learning_count', models.IntegerField(default=0, verbose_name='在学课程数')),
                ('coupon_count', models.IntegerField(default=0, verbose_name='优惠券数')),
                ('study_hours', models.IntegerField(default=0, verbose_name='学习时长(小时)')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='录入时间')),
            ],
            options={
                'verbose_name': '学员信息',
                'verbose_name_plural': '学员信息',
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='项目名称')),
                ('image', models.URLField(default='https://images.unsplash.com/photo-1526379095098-d400fd0bf935', verbose_name='封面图片URL')),
                ('students', models.IntegerField(default=0, verbose_name='学习人数')),
                ('rating', models.DecimalField(decimal_places=1, default=5.0, max_digits=3, verbose_name='评分')),
                ('duration', models.CharField(default='4 周', max_length=20, verbose_name='时长')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='crm.category', verbose_name='所属分类')),
            ],
            options={
                'verbose_name': '项目课程',
                'verbose_name_plural': '项目课程',
            },
        ),
    ]
