# Generated manually for tixian audit flow
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('yonghu', '0029_remove_userguanshi_fenhong_yici_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='TixianShenheJilu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shenhe_danhao', models.CharField(db_index=True, max_length=32, unique=True, verbose_name='审核单号')),
                ('yonghuid', models.CharField(db_index=True, max_length=7, verbose_name='用户ID')),
                ('leixing', models.PositiveSmallIntegerField(db_index=True, verbose_name='提现类型')),
                ('zhuangtai', models.IntegerField(db_index=True, default=1, verbose_name='审核状态(1审核中2提现成功3提现失败4审核成功5审核失败6待收款)')),
                ('shenqing_jine', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='申请提现金额(扣款额)')),
                ('shouxufei', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='手续费')),
                ('shijidaozhang', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='实际到账金额')),
                ('feilv', models.DecimalField(decimal_places=4, default=0, max_digits=5, verbose_name='手续费率')),
                ('bhliyou', models.TextField(blank=True, null=True, verbose_name='驳回/失败原因')),
                ('bo_hui_ren_id', models.CharField(blank=True, db_index=True, max_length=11, null=True, verbose_name='驳回人用户ID')),
                ('shenhe_ren_id', models.CharField(blank=True, db_index=True, max_length=11, null=True, verbose_name='审核通过操作人ID')),
                ('tixianjilu_id', models.IntegerField(blank=True, db_index=True, null=True, verbose_name='关联Tixianjilu.id')),
                ('tixian_auto_id', models.CharField(blank=True, db_index=True, max_length=32, null=True, unique=True, verbose_name='关联TixianAutoRecord.tixian_id')),
                ('fail_reason', models.TextField(blank=True, null=True, verbose_name='微信打款失败原因')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '提现审核记录',
                'verbose_name_plural': '提现审核记录',
                'db_table': 'tixian_shenhe_jilu',
            },
        ),
        migrations.AddField(
            model_name='tixianjilu',
            name='shenhe_danhao',
            field=models.CharField(blank=True, db_index=True, max_length=32, null=True, verbose_name='关联提现审核单号'),
        ),
        migrations.AddField(
            model_name='tixianjilu',
            name='shenhe_jilu_id',
            field=models.IntegerField(blank=True, db_index=True, null=True, verbose_name='关联提现审核记录ID(TixianShenheJilu.id)'),
        ),
        migrations.AddField(
            model_name='tixianautorecord',
            name='shenhe_danhao',
            field=models.CharField(blank=True, db_index=True, max_length=32, null=True, verbose_name='关联审核单号'),
        ),
        migrations.AddIndex(
            model_name='tixianjilu',
            index=models.Index(fields=['shenhe_danhao'], name='tixianjilu_shenhe_danhao_idx'),
        ),
        migrations.AddIndex(
            model_name='tixianjilu',
            index=models.Index(fields=['shenhe_jilu_id'], name='tixianjilu_shenhe_jilu_id_idx'),
        ),
        migrations.AddIndex(
            model_name='tixianshenhejilu',
            index=models.Index(fields=['yonghuid', 'zhuangtai'], name='txsh_yonghu_zhuangtai_idx'),
        ),
        migrations.AddIndex(
            model_name='tixianshenhejilu',
            index=models.Index(fields=['yonghuid', 'leixing'], name='txsh_yonghu_leixing_idx'),
        ),
        migrations.AddIndex(
            model_name='tixianshenhejilu',
            index=models.Index(fields=['shenhe_danhao'], name='txsh_shenhe_danhao_idx'),
        ),
    ]
