# Generated by Django 5.2.7 on 2025-11-13 08:58

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


class Migration(migrations.Migration):

    dependencies = [
        ('basic_info', '0009_product_minimum_quantity'),
        ('printing', '0007_alter_printingjob_description_and_more'),
        ('stateflow', '0015_stateparameter_attachment'),
    ]

    operations = [
        migrations.CreateModel(
            name='PlateOrder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('plate_code', models.CharField(max_length=50, unique=True, verbose_name='版单编号')),
                ('design_code', models.CharField(blank=True, max_length=50, null=True, verbose_name='设计编号')),
                ('plate_type', models.CharField(blank=True, max_length=20, null=True, verbose_name='起版情况')),
                ('plate_date', models.DateTimeField(blank=True, null=True, verbose_name='下版时间')),
                ('plate_method', models.CharField(blank=True, max_length=50, null=True, verbose_name='开版方式')),
                ('plate_image', models.FileField(blank=True, null=True, upload_to='plate_images/', verbose_name='开版图')),
                ('plate_notes', models.TextField(blank=True, null=True, verbose_name='打版注意事项')),
                ('reprint_reason', models.TextField(blank=True, null=True, verbose_name='复版原因')),
                ('development_status', models.CharField(blank=True, max_length=20, null=True, verbose_name='开发进程')),
                ('urgency_level', models.CharField(default='正常', max_length=20, verbose_name='紧急程度')),
                ('area', models.CharField(blank=True, max_length=255, null=True, verbose_name='区域')),
                ('default_address', models.CharField(blank=True, max_length=500, null=True, verbose_name='默认地址')),
                ('is_mark_frame', models.BooleanField(default=False, verbose_name='是否套唛架')),
                ('drawing_rating', models.CharField(blank=True, max_length=20, null=True, verbose_name='画图评级')),
                ('color_matching_rating', models.CharField(blank=True, max_length=20, null=True, verbose_name='调色评级')),
                ('sample_rating', models.CharField(blank=True, max_length=20, null=True, verbose_name='套样评级')),
                ('difficulty_rating', models.CharField(blank=True, max_length=20, null=True, verbose_name='难度评级')),
                ('required_completion_date', models.DateField(blank=True, null=True, verbose_name='要求完成时间')),
                ('completion_date', models.DateTimeField(blank=True, null=True, verbose_name='完成时间')),
                ('fabric', models.CharField(blank=True, max_length=100, null=True, verbose_name='布料')),
                ('width', models.CharField(blank=True, max_length=50, null=True, verbose_name='幅宽')),
                ('style_name', models.CharField(blank=True, max_length=100, null=True, verbose_name='款号名称')),
                ('production_method', models.CharField(blank=True, max_length=50, null=True, verbose_name='做货方式')),
                ('sample_meter', models.CharField(blank=True, max_length=100, null=True, verbose_name='米样')),
                ('required_sample_meters', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='客户要求米样米数')),
                ('approval_result', models.CharField(blank=True, max_length=50, null=True, verbose_name='审批结果')),
                ('is_ordered', models.BooleanField(default=False, verbose_name='是否已下单')),
                ('customer_feedback', models.TextField(blank=True, null=True, verbose_name='客户修改意见')),
                ('business_object', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='plate_order', to='stateflow.businessobject', verbose_name='流程实例')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='plate_orders', to='basic_info.customer', verbose_name='客户')),
                ('merchandiser', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='plate_orders_as_merchandiser', to='basic_info.employee', verbose_name='跟单员')),
                ('salesperson', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='plate_orders_as_salesperson', to='basic_info.employee', verbose_name='销售员')),
            ],
            options={
                'verbose_name': '开版订单',
                'verbose_name_plural': '开版订单',
                'ordering': ['-created_at'],
            },
        ),
    ]
