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


class Migration(migrations.Migration):

    dependencies = [
        ('business', '0024_prepurchaseorder_operator_presalesorder_operator_and_more'),
        ('basic_info', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AllocationRecord',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('stock_ids', models.TextField(blank=True, null=True, verbose_name='库存明细ID列表')),
                ('quantity', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='配货数量')),
                ('unit', models.CharField(max_length=50, verbose_name='单位')),
                ('status', models.IntegerField(choices=[(1, '有效'), (2, '已撤销')], default=1, verbose_name='状态')),
                ('scanned_at', models.DateTimeField(auto_now_add=True, verbose_name='扫码时间')),
                ('remarks', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('pre_sales_order_item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='allocation_records', to='business.presalesorderitem', verbose_name='预销售单明细')),
                ('scanned_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='allocation_records', to='basic_info.employee', verbose_name='扫码人员')),
            ],
            options={
                'verbose_name': '配货记录',
                'verbose_name_plural': '配货记录',
            },
        ),
    ]
