# Generated by Django 6.0.1 on 2026-02-02 06:16

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


class Migration(migrations.Migration):

    dependencies = [
        ('shop', '0007_productfeature'),
    ]

    operations = [
        migrations.AddField(
            model_name='service',
            name='delivery_content',
            field=models.TextField(blank=True, help_text='描述将交付给客户的具体成果', verbose_name='交付内容'),
        ),
        migrations.AddField(
            model_name='service',
            name='delivery_time',
            field=models.CharField(blank=True, help_text='例如：3-5个工作日', max_length=50, verbose_name='预计交付周期'),
        ),
        migrations.AddField(
            model_name='service',
            name='price',
            field=models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='起步价格'),
        ),
        migrations.AddField(
            model_name='service',
            name='unit',
            field=models.CharField(default='次', help_text='例如：次、小时、月、个', max_length=20, verbose_name='计费单位'),
        ),
        migrations.CreateModel(
            name='ServiceOrder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer_name', models.CharField(max_length=100, verbose_name='客户姓名')),
                ('company_name', models.CharField(blank=True, max_length=100, verbose_name='公司名称')),
                ('phone_number', models.CharField(max_length=20, verbose_name='联系电话')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='电子邮箱')),
                ('requirements', models.TextField(blank=True, verbose_name='具体需求描述')),
                ('total_price', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='预估总价')),
                ('status', models.CharField(choices=[('pending', '待沟通/待支付'), ('processing', '服务进行中'), ('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='更新时间')),
                ('salesperson', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='shop.salesperson', verbose_name='所属销售员')),
                ('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shop.service', verbose_name='所选服务')),
            ],
            options={
                'verbose_name': '服务订单',
                'verbose_name_plural': '服务订单列表',
            },
        ),
    ]
