# Generated by Django 2.1.7 on 2020-12-15 09:39

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0095_auto_20201214_1239'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('sales', '0094_auto_20201214_1239'),
    ]

    operations = [
        migrations.CreateModel(
            name='HeXiao_Dispatch_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('award_name', models.CharField(blank=True, db_index=True, max_length=200, null=True, verbose_name='奖品名称')),
                ('agent_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='终端店名称')),
                ('user_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='业务员名称')),
                ('user_phone', models.CharField(blank=True, max_length=200, null=True, verbose_name='业务员电话')),
                ('is_accepted', models.BooleanField(default=False, verbose_name='是否已经收货')),
                ('tm', models.DateTimeField(auto_now_add=True, null=True, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='hexiao_dispatch_agent', to='company.Company', verbose_name='公司名称')),
                ('award', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.Award', verbose_name='奖品')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '配送记录',
                'verbose_name_plural': '配送记录',
            },
        ),
        migrations.CreateModel(
            name='HeXiao_Record',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('activity_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='活动名称')),
                ('award_name', models.CharField(blank=True, db_index=True, max_length=200, null=True, verbose_name='奖品名称')),
                ('consumer_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='用户姓名')),
                ('consumer_phone', models.CharField(blank=True, max_length=50, null=True, verbose_name='用户电话')),
                ('agent_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='终端店名称')),
                ('user_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='业务员名称')),
                ('user_phone', models.CharField(blank=True, max_length=200, null=True, verbose_name='业务员电话')),
                ('is_need_dispatch', models.BooleanField(default=True, verbose_name='是否需要配送')),
                ('is_dispatched', models.BooleanField(default=False, verbose_name='是否已经配送')),
                ('is_need_money_return', models.BooleanField(default=False, verbose_name='是否需要返现')),
                ('is_money_returned', models.BooleanField(default=False, verbose_name='是否已经返现')),
                ('is_permit', models.BooleanField(default=False, verbose_name='是否允许')),
                ('tm', models.DateTimeField(auto_now_add=True, null=True, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('activity', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='sales.Activities', verbose_name='活动名称')),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='hexiao_record_agent', to='company.Company', verbose_name='公司名称')),
                ('award', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.Award', verbose_name='奖品')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
                ('consumer', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.ConsumerAccount', verbose_name='用户')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='业务员')),
            ],
            options={
                'verbose_name': '核销记录',
                'verbose_name_plural': '核销记录',
            },
        ),
        migrations.CreateModel(
            name='HeXiao_Returned_Money',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('award_name', models.CharField(blank=True, db_index=True, max_length=200, null=True, verbose_name='奖品名称')),
                ('agent_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='终端店名称')),
                ('user_name', models.CharField(blank=True, max_length=200, null=True, verbose_name='业务员名称')),
                ('user_phone', models.CharField(blank=True, max_length=200, null=True, verbose_name='业务员电话')),
                ('money', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='返利金额')),
                ('is_money_returned', models.BooleanField(default=False, verbose_name='是否已经返现')),
                ('tm', models.DateTimeField(auto_now_add=True, null=True, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='hexiao_returned_money_agent', to='company.Company', verbose_name='公司名称')),
                ('award', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.Award', verbose_name='奖品')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司名称')),
                ('hexiao', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.HeXiao_Record', verbose_name='核销记录')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='业务员')),
            ],
            options={
                'verbose_name': '核销返现记录',
                'verbose_name_plural': '核销返现记录',
            },
        ),
        migrations.AddField(
            model_name='consumerwinner',
            name='is_hexiao',
            field=models.BooleanField(default=False, verbose_name='是否已经核销'),
        ),
        migrations.AddField(
            model_name='consumerwinner',
            name='is_need_hexiao',
            field=models.BooleanField(default=False, verbose_name='是否需要核销'),
        ),
        migrations.AddField(
            model_name='hexiao_dispatch_record',
            name='hexiao',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sales.HeXiao_Record', verbose_name='核销记录'),
        ),
        migrations.AddField(
            model_name='hexiao_dispatch_record',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='业务员'),
        ),
    ]
