# Generated by Django 3.1.4 on 2022-08-10 19:32

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0300_user_roles'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('sales', '0292_auto_20220802_1506'),
    ]

    operations = [
        migrations.AddField(
            model_name='hexiao_record',
            name='withdraw_id',
            field=models.IntegerField(blank=True, null=True, verbose_name='提现记录ID'),
        ),
        migrations.CreateModel(
            name='Withdraw',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='金额')),
                ('reason', models.CharField(blank=True, max_length=500, null=True, verbose_name='原因')),
                ('remark', models.CharField(blank=True, max_length=30, null=True, verbose_name='备注')),
                ('state', models.SmallIntegerField(choices=[(0, '未审核'), (1, '通过'), (2, '未通过')], default=0, verbose_name='状态')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('ancestor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='withdraw_ancestor', to='company.company', verbose_name='所属企业')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='withdraw_company', to='company.company', verbose_name='扫码单位')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='withdraw_user', to=settings.AUTH_USER_MODEL, verbose_name='操作人')),
            ],
            options={
                'verbose_name': '提现记录',
                'verbose_name_plural': '提现记录',
            },
        ),
    ]
