# Generated by Django 6.0.1 on 2026-02-02 04:14

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


class Migration(migrations.Migration):

    dependencies = [
        ('shop', '0002_order_customer_name_order_phone_number_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Salesperson',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='销售员姓名')),
                ('code', models.CharField(help_text='唯一的推广标识码，如: zhangsan01', max_length=20, unique=True, verbose_name='推广码')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '销售员',
                'verbose_name_plural': '销售员管理',
            },
        ),
        migrations.AlterModelOptions(
            name='esp32config',
            options={'verbose_name': '硬件配置 (小智参数)', 'verbose_name_plural': '硬件配置 (小智参数)'},
        ),
        migrations.AddField(
            model_name='order',
            name='salesperson',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='orders', to='shop.salesperson', verbose_name='所属销售员'),
        ),
    ]
