# Generated by Django 3.1.4 on 2021-01-22 11:04

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0122_auto_20210122_0811'),
    ]

    operations = [
        migrations.CreateModel(
            name='WxWalletApplication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(db_index=True, verbose_name='族系')),
                ('app_wxopenid', models.CharField(max_length=50, verbose_name='申请人微信openid')),
                ('app_nickname', models.CharField(db_index=True, max_length=100, verbose_name='申请人微信昵称')),
                ('app_headimgurl', models.CharField(max_length=400, verbose_name='申请人微信头像')),
                ('cellphone', models.CharField(max_length=20, verbose_name='手机号码')),
                ('realname', models.CharField(max_length=30, verbose_name='实名制收款人')),
                ('status', models.SmallIntegerField(default=0, verbose_name='当前状态')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注')),
                ('app_company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.company', verbose_name='申请经销商')),
                ('app_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='申请人')),
                ('wxopenid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.wxopenid', verbose_name='收款人wxopenid')),
            ],
            options={
                'verbose_name': '微信钱包申请',
                'verbose_name_plural': '微信钱包申请',
            },
        ),
        migrations.AlterField(
            model_name='wxwallet',
            name='status',
            field=models.SmallIntegerField(choices=[(0, '申请'), (1, '内勤审核'), (2, '财务审核'), (10, '变更'), (10000, '已确认')], default=0, verbose_name='当前状态'),
        ),
        migrations.CreateModel(
            name='WxWalletReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(db_index=True, verbose_name='族系')),
                ('comment', models.CharField(blank=True, max_length=100, null=True, verbose_name='审核意见')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注')),
                ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.wxwalletapplication', verbose_name='微信钱包申请')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wxwalletreview_user', to=settings.AUTH_USER_MODEL, verbose_name='审核人')),
            ],
            options={
                'verbose_name': '微信钱包审核',
                'verbose_name_plural': '微信钱包审核',
            },
        ),
        migrations.AddField(
            model_name='wxwalletapplication',
            name='wxwallet',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.wxwallet', verbose_name='经销商微信钱包'),
        ),
    ]
