# Generated by Django 5.2.7 on 2025-11-12 07:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('basic_info', '0009_product_minimum_quantity'),
    ]

    operations = [
        migrations.CreateModel(
            name='PrintingOrder',
            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='更新时间')),
                ('fabric', models.CharField(max_length=100, verbose_name='面料')),
                ('width', models.CharField(max_length=100, verbose_name='幅宽')),
                ('is_urgent', models.BooleanField(default=False, verbose_name='紧急')),
                ('area', models.CharField(blank=True, max_length=100, null=True, verbose_name='地区')),
                ('address', models.CharField(blank=True, max_length=200, null=True, verbose_name='地址')),
                ('fabric_source', models.CharField(max_length=100, null=True, verbose_name='布料来源')),
                ('is_fabric_received', models.BooleanField(default=False, verbose_name='布料是否已收')),
                ('craft', models.CharField(max_length=100, null=True, verbose_name='工艺')),
                ('description', models.TextField(blank=True, null=True, verbose_name='订单描述')),
                ('outgoing_date', models.DateField(blank=True, null=True, verbose_name='出货日期')),
                ('curve', models.CharField(blank=True, max_length=100, null=True, verbose_name='曲线')),
                ('new_curve', models.CharField(blank=True, max_length=100, null=True, verbose_name='新加曲线')),
                ('position', models.TextField(blank=True, null=True, verbose_name='位置')),
                ('printing_warn', models.TextField(blank=True, null=True, verbose_name='打印注意事项')),
                ('rolling_warn', models.TextField(blank=True, null=True, verbose_name='滚筒注意事项')),
                ('production_warn', models.TextField(blank=True, null=True, verbose_name='生产注意事项')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='printing_orders', to='basic_info.customer', verbose_name='客户')),
            ],
            options={
                'verbose_name': '印染订单',
                'verbose_name_plural': '印染订单',
            },
        ),
        migrations.CreateModel(
            name='PrintingJob',
            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='更新时间')),
                ('quantity', models.PositiveIntegerField(verbose_name='数量')),
                ('unit', models.CharField(max_length=50, verbose_name='单位')),
                ('size', models.CharField(max_length=100, verbose_name='一段尺寸')),
                ('pieces', models.PositiveIntegerField(verbose_name='件数')),
                ('description', models.TextField(blank=True, verbose_name='备注')),
                ('status', models.CharField(max_length=50, verbose_name='状态')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='printing_jobs', to='basic_info.product', verbose_name='产品')),
                ('printing_order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='printing_jobs', to='printing.printingorder', verbose_name='主订单')),
            ],
            options={
                'verbose_name': '印染款式明细',
                'verbose_name_plural': '印染款式明细',
            },
        ),
    ]
