# Generated by Django 3.1.4 on 2021-11-15 14:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0257_auto_20211111_1014'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('inventory', '0122_auto_20211113_1458'),
    ]

    operations = [
        migrations.CreateModel(
            name='DeliveryNote',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('salesorder_id', models.IntegerField(blank=True, null=True, verbose_name='销售订单')),
                ('salesorder_code', models.CharField(blank=True, max_length=20, null=True, verbose_name='销售订单类型编码')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='确认日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='确认时间')),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dn_agent', to='company.company', verbose_name='经销商')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dn_company', to='company.company', verbose_name='企业名称')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='dn_user', to=settings.AUTH_USER_MODEL, verbose_name='确认人')),
            ],
            options={
                'verbose_name': '发货/拣配单',
                'verbose_name_plural': '发货/拣配单',
            },
        ),
        migrations.CreateModel(
            name='ProformaInbound',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='确认日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='确认时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='proformainbound_company', to='company.company', verbose_name='企业名称')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='proformainbound_user', to=settings.AUTH_USER_MODEL, verbose_name='确认人')),
            ],
            options={
                'verbose_name': '形式入库单',
                'verbose_name_plural': '形式入库单',
            },
        ),
        migrations.CreateModel(
            name='ProformaInboundDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_id', models.IntegerField(blank=True, null=True, verbose_name='产品ID')),
                ('product_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='产品名称')),
                ('product_code', models.CharField(blank=True, max_length=20, null=True, verbose_name='产品代码')),
                ('qty', models.IntegerField(blank=True, null=True, verbose_name='数量')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='确认日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='确认时间')),
                ('ProformaInbound', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.proformainbound', verbose_name='发货/拣配单')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='proformainbounddetails_company', to='company.company', verbose_name='企业名称')),
            ],
            options={
                'verbose_name': '形式入库单明细',
                'verbose_name_plural': '形式入库单明细',
            },
        ),
        migrations.CreateModel(
            name='DNDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ordertype_id', models.IntegerField(blank=True, null=True, verbose_name='销售订单类型_id')),
                ('oedertype_code', models.CharField(blank=True, max_length=20, null=True, verbose_name='销售订单类型_代码')),
                ('product_id', models.IntegerField(blank=True, null=True, verbose_name='产品ID')),
                ('product_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='产品名称')),
                ('product_code', models.CharField(blank=True, max_length=20, null=True, verbose_name='产品代码')),
                ('qty', models.IntegerField(blank=True, null=True, verbose_name='数量')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='确认日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='确认时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dndetails_company', to='company.company', verbose_name='企业名称')),
                ('deliverynote', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.deliverynote', verbose_name='发货/拣配单')),
            ],
            options={
                'verbose_name': '发货/拣配单明细',
                'verbose_name_plural': '发货/拣配单明细',
            },
        ),
    ]
