# Generated by Django 3.1.4 on 2021-07-18 12:07

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0018_series_icon'),
        ('sales', '0216_activityrebate_brandrecommenderbonus_kangnian_inventorymanipulation'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='rebatetransfer',
            name='application_id',
        ),
        migrations.RemoveField(
            model_name='rebatetransfer',
            name='tm_paid',
        ),
        migrations.AddField(
            model_name='kangnian_reservelabel',
            name='product',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.product', verbose_name='产品信息'),
        ),
        migrations.AddField(
            model_name='kangnian_reservelabel',
            name='product_num',
            field=models.IntegerField(blank=True, null=True, verbose_name='数量'),
        ),
        migrations.AddField(
            model_name='kangnian_reservelabel',
            name='wantTm',
            field=models.DateTimeField(blank=True, null=True, verbose_name='上店时间'),
        ),
        migrations.AddField(
            model_name='rebatetransfer',
            name='application',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='sales.rebateapplication', verbose_name='经销商提现申请'),
        ),
        migrations.AddField(
            model_name='rebatetransfer',
            name='tm',
            field=models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='时间'),
        ),
        migrations.AlterField(
            model_name='rebatetransfer',
            name='operator_id',
            field=models.IntegerField(blank=True, null=True, verbose_name='转帐操作人'),
        ),
        migrations.CreateModel(
            name='RebatePayment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('company_id', models.IntegerField(db_index=True, verbose_name='企业ID')),
                ('rebatepayable_id', models.IntegerField(blank=True, null=True, verbose_name='返利应付款ID')),
                ('rebatepaylog_id', models.IntegerField(blank=True, null=True, verbose_name='返利支付日志ID')),
                ('payment_no', models.CharField(blank=True, max_length=40, null=True, verbose_name='微信付款单号')),
                ('bank_statement', models.CharField(blank=True, max_length=50, null=True, verbose_name='银行转帐流水单号')),
                ('amount', models.DecimalField(blank=True, decimal_places=2, max_digits=11, null=True, verbose_name='实际付款金额')),
                ('operator_id', models.IntegerField(blank=True, null=True, verbose_name='付款操作人ID')),
                ('dt', models.DateField(db_index=True, default=django.utils.timezone.now, verbose_name='日期')),
                ('tm', models.DateTimeField(default=django.utils.timezone.now, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('application', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rebatepayment_application', to='sales.rebateapplication', verbose_name='经销商提现申请')),
                ('rebateclosing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rebatepayment_closing', to='sales.rebateclosing', verbose_name='会计期')),
                ('transfer', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rebatepayment_tranfer', to='sales.rebatetransfer', verbose_name='提现申请转帐记录')),
            ],
            options={
                'verbose_name': '会计期返利付款明细',
                'verbose_name_plural': '会计期返利付款明细',
            },
        ),
    ]
