# Generated by Django 2.1.7 on 2020-10-02 14:17

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('product', '0010_test'),
        ('company', '0063_company_lng_lat'),
        ('promotion', '0012_prjmaterial_remark'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApplicationMaterials',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='数量')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
            ],
            options={
                'verbose_name': '申请单物料明细',
                'verbose_name_plural': '申请单物料明细',
            },
        ),
        migrations.CreateModel(
            name='ApplicationProducts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='数量')),
                ('package_id', models.SmallIntegerField(choices=[(3, '箱'), (1, '瓶')], verbose_name='单位')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
            ],
            options={
                'verbose_name': '申请单礼品酒明细',
                'verbose_name_plural': '申请单礼品酒明细',
            },
        ),
        migrations.CreateModel(
            name='GiftsAppliction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.CharField(max_length=100, verbose_name='申请理由')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '礼品申请单',
                'verbose_name_plural': '礼品申请单',
            },
        ),
        migrations.CreateModel(
            name='GiftsRequisition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '礼品领用单',
                'verbose_name_plural': '礼品领用单',
            },
        ),
        migrations.CreateModel(
            name='GiftsScheme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='活动名称')),
                ('scope', models.CharField(max_length=100, verbose_name='有效范围')),
                ('region', models.CharField(max_length=100, verbose_name='地区')),
                ('agent_type', models.CharField(max_length=100, verbose_name='客户类型')),
                ('condition', models.CharField(max_length=100, verbose_name='发放条件')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('tm_app_latest', models.DateTimeField(verbose_name='最晚申请时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='公司名称')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='操作员')),
            ],
            options={
                'verbose_name': '促销礼品方案',
                'verbose_name_plural': '促销礼品方案',
            },
        ),
        migrations.CreateModel(
            name='GiftsStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='状态名')),
                ('sn', models.SmallIntegerField(blank=True, null=True, verbose_name='序号')),
                ('remqrk', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('company', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '礼品核销状态',
                'verbose_name_plural': '礼品核销状态',
            },
        ),
        migrations.CreateModel(
            name='RequisitionMaterials',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='数量')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
                ('material', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.Material', verbose_name='物料名称')),
                ('requisition', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsRequisition', verbose_name='礼品申请单')),
            ],
            options={
                'verbose_name': '领用单物料明细',
                'verbose_name_plural': '领用单物料明细',
            },
        ),
        migrations.CreateModel(
            name='RequisitionProductDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vtype_id', models.SmallIntegerField(blank=True, null=True, verbose_name='扫码类型')),
                ('label_code', models.CharField(max_length=20, verbose_name='标签号码')),
                ('package_id', models.SmallIntegerField(blank=True, null=True, verbose_name='标签类型')),
                ('label_id', models.BigIntegerField(blank=True, null=True, verbose_name='标签ID')),
                ('label_pk_id', models.BigIntegerField(blank=True, null=True, verbose_name='主标签ID')),
                ('err', 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, to='company.Company', verbose_name='公司名称')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='礼品酒名称')),
                ('requisition', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsRequisition', verbose_name='礼品申请单')),
                ('scheme', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsScheme', verbose_name='礼品促销方案')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='操作人')),
            ],
            options={
                'verbose_name': '促销礼品酒扫码状态明细',
                'verbose_name_plural': '促销礼品酒扫码状态明细',
            },
        ),
        migrations.CreateModel(
            name='RequisitionProducts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='数量')),
                ('package_id', models.SmallIntegerField(choices=[(3, '箱'), (1, '瓶')], verbose_name='单位')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品名称')),
                ('requisition', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsRequisition', verbose_name='礼品申请单')),
            ],
            options={
                'verbose_name': '领用单礼品酒明细',
                'verbose_name_plural': '领用单礼品酒明细',
            },
        ),
        migrations.CreateModel(
            name='SchemeMaterials',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='数量')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
                ('material', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.Material', verbose_name='物料名称')),
                ('scheme', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsScheme', verbose_name='促销礼品方案')),
            ],
            options={
                'verbose_name': '方案促销物料明细',
                'verbose_name_plural': '方案促销物料明细',
            },
        ),
        migrations.CreateModel(
            name='SchemeProducts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='数量')),
                ('package_id', models.SmallIntegerField(choices=[(3, '箱'), (1, '瓶')], verbose_name='单位')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='促销礼品酒')),
                ('scheme', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsScheme', verbose_name='促销礼品方案')),
            ],
            options={
                'verbose_name': '方案礼品酒明细',
                'verbose_name_plural': '方案礼品酒明细',
            },
        ),
        migrations.AddField(
            model_name='prjproductdetails',
            name='vtype_id',
            field=models.SmallIntegerField(blank=True, null=True, verbose_name='扫码类型'),
        ),
        migrations.AddField(
            model_name='giftsrequisition',
            name='scheme',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsScheme', verbose_name='礼品促销方案'),
        ),
        migrations.AddField(
            model_name='giftsrequisition',
            name='status',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsStatus', verbose_name='领用状态'),
        ),
        migrations.AddField(
            model_name='giftsrequisition',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='操作员'),
        ),
        migrations.AddField(
            model_name='giftsappliction',
            name='scheme',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsScheme', verbose_name='礼品促销方案'),
        ),
        migrations.AddField(
            model_name='giftsappliction',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='操作员'),
        ),
        migrations.AddField(
            model_name='applicationproducts',
            name='application',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsAppliction', verbose_name='礼品申请单'),
        ),
        migrations.AddField(
            model_name='applicationproducts',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品名称'),
        ),
        migrations.AddField(
            model_name='applicationmaterials',
            name='application',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.GiftsAppliction', verbose_name='礼品申请单'),
        ),
        migrations.AddField(
            model_name='applicationmaterials',
            name='material',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='promotion.Material', verbose_name='物料名称'),
        ),
    ]
