from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0009_user_shangjia_teyue'),
    ]

    operations = [
        migrations.CreateModel(
            name='GuanshiChangeLeaderQuota',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('club_id', models.CharField(db_index=True, max_length=16, verbose_name='俱乐部ID')),
                ('guanshi_uid', models.CharField(db_index=True, max_length=7, verbose_name='管事UserUID')),
                ('total_quota', models.IntegerField(default=1, verbose_name='总次数')),
                ('used_count', models.IntegerField(default=0, verbose_name='已用次数')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('UpdateTime', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '管事换组长配额',
                'verbose_name_plural': '管事换组长配额',
                'db_table': 'guanshi_change_leader_quota',
                'indexes': [
                    models.Index(fields=['club_id', 'guanshi_uid'], name='guanshi_cha_club_id_b8a1f0_idx'),
                ],
                'unique_together': {('club_id', 'guanshi_uid')},
            },
        ),
        migrations.CreateModel(
            name='GuanshiChangeLeaderLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('club_id', models.CharField(db_index=True, max_length=16, verbose_name='俱乐部ID')),
                ('guanshi_uid', models.CharField(db_index=True, max_length=7, verbose_name='管事UserUID')),
                ('guanshi_name', models.CharField(blank=True, default='', max_length=50, verbose_name='管事昵称')),
                ('old_zuzhang_uid', models.CharField(blank=True, default='', max_length=7, verbose_name='原组长UID')),
                ('new_zuzhang_uid', models.CharField(db_index=True, max_length=7, verbose_name='新组长UID')),
                ('new_invite_code', models.CharField(blank=True, default='', max_length=40, verbose_name='提交的邀请码')),
                ('source', models.CharField(default='miniapp', max_length=20, verbose_name='来源')),
                ('operator', models.CharField(blank=True, default='', max_length=64, verbose_name='操作人')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='更换时间')),
            ],
            options={
                'verbose_name': '管事换组长记录',
                'verbose_name_plural': '管事换组长记录',
                'db_table': 'guanshi_change_leader_log',
                'indexes': [
                    models.Index(fields=['club_id', 'guanshi_uid', '-CreateTime'], name='guanshi_cha_club_id_9c2e1a_idx'),
                ],
            },
        ),
    ]
