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


class Migration(migrations.Migration):

    dependencies = [
        ('rank', '0004_rank_reward'),
    ]

    operations = [
        migrations.AddField(
            model_name='rankrewardscheme',
            name='activity_start',
            field=models.DateField(blank=True, null=True, verbose_name='活动开始日期'),
        ),
        migrations.AddField(
            model_name='rankrewardscheme',
            name='activity_end',
            field=models.DateField(blank=True, null=True, verbose_name='活动结束日期'),
        ),
        migrations.CreateModel(
            name='RankRewardClaimLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('yonghuid', models.CharField(db_index=True, max_length=7, verbose_name='用户ID')),
                ('action', models.CharField(
                    choices=[('claim_start', '开始领取'), ('claim_success', '领取成功'), ('claim_reject', '领取拒绝')],
                    max_length=32, verbose_name='动作',
                )),
                ('amount', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='金额')),
                ('detail', models.CharField(blank=True, default='', max_length=256, verbose_name='说明')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('claim', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE,
                    related_name='logs',
                    to='rank.rankrewardclaim',
                    verbose_name='领取记录',
                )),
            ],
            options={
                'verbose_name': '排行榜奖励领取日志',
                'verbose_name_plural': '排行榜奖励领取日志',
                'db_table': 'rank_reward_claim_log',
                'ordering': ['-CreateTime'],
            },
        ),
    ]
