# Generated by Django 5.2.7 on 2025-11-20 05:56

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


class Migration(migrations.Migration):

    dependencies = [
        ('basic_info', '0010_warehouse_type'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='employee',
            name='job_type',
        ),
        migrations.CreateModel(
            name='EmployeeType',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50, verbose_name='职位名称')),
                ('description', models.TextField(blank=True, null=True, verbose_name='职位描述')),
                ('reverse', models.CharField(blank=True, max_length=100, null=True, verbose_name='预留字段')),
                ('merchant', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='employee_types', to='basic_info.merchant', verbose_name='所属商户')),
            ],
            options={
                'verbose_name': '员工职位类型',
                'verbose_name_plural': '员工职位类型',
                'unique_together': {('merchant', 'title')},
            },
        ),
        migrations.AddField(
            model_name='employee',
            name='position',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='employees', to='basic_info.employeetype', verbose_name='职位'),
        ),
    ]
