# Generated by Django 2.1.7 on 2020-06-24 19:07

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0043_auto_20200620_0908'),
        ('sales', '0006_auto_20200624_1902'),
    ]

    operations = [
        migrations.CreateModel(
            name='ConsumerAwardDelivery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('waybill_number', models.CharField(blank=True, max_length=30, null=True, verbose_name='快递单号')),
                ('ref_code', models.CharField(blank=True, max_length=30, null=True, verbose_name='外部关联单号')),
                ('tm_send', models.DateTimeField(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='时间')),
                ('tm_received', models.DateTimeField(blank=True, null=True, verbose_name='收货时间')),
                ('is_closed', models.BooleanField(default=False, 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.CASCADE, related_name='awarddelivery_activity', to='sales.Activities', verbose_name='活动名称')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='awarddelivery_company', to='company.Company', verbose_name='公司名称')),
                ('expressagency', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='awarddelivery_expressagency', to='sales.ExpressAgency', verbose_name='快递代理公司')),
            ],
            options={
                'verbose_name': '奖品派送',
                'verbose_name_plural': '奖品派送',
            },
        ),
        migrations.RemoveField(
            model_name='consumerwinner',
            name='dt_redeemed',
        ),
        migrations.AddField(
            model_name='consumerwinner',
            name='tm_redeemed',
            field=models.DateTimeField(blank=True, null=True, verbose_name='领奖时间'),
        ),
        migrations.AddField(
            model_name='consumerawarddelivery',
            name='winner',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='awarddelivery_awardwinner', to='sales.ConsumerWinner', verbose_name='中奖记录'),
        ),
    ]
