# Generated by Django 4.2.27 on 2026-06-17 21:18

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('orders', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Bankuai',
            fields=[
                ('bankuai_id', models.AutoField(primary_key=True, serialize=False, verbose_name='板块ID')),
                ('mingcheng', models.CharField(db_index=True, max_length=50, unique=True, verbose_name='板块名称')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '板块',
                'verbose_name_plural': '板块',
                'db_table': 'bankuai',
            },
        ),
        migrations.CreateModel(
            name='Chenghao',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mingcheng', models.CharField(max_length=50, unique=True, verbose_name='称号名称')),
                ('leixing', models.CharField(choices=[('dashou', '打手'), ('boss', '老板'), ('shangjia', '商家'), ('guanshi', '管事'), ('zuzhang', '组长')], max_length=10, verbose_name='称号类型')),
                ('tubiao_url', models.CharField(blank=True, max_length=200, null=True, verbose_name='称号图标相对URL')),
                ('texiao_miaoshu', models.TextField(blank=True, null=True, verbose_name='特效描述(JSON)')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('kaohe_guize', models.TextField(blank=True, null=True, verbose_name='考核规则')),
                ('kaioi_jinpai', models.BooleanField(default=False, verbose_name='是否同时开启金牌')),
                ('bankuai', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='rank.bankuai', verbose_name='所属板块(空=全板块通用)')),
            ],
            options={
                'verbose_name': '称号',
                'verbose_name_plural': '称号',
                'db_table': 'chenghao',
            },
        ),
        migrations.CreateModel(
            name='KaohePayTemp',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dingdan_id', models.CharField(db_index=True, max_length=50, unique=True, verbose_name='订单ID')),
                ('yonghuid', models.CharField(db_index=True, max_length=7, verbose_name='用户ID')),
                ('tag_id', models.IntegerField(verbose_name='标签ID')),
                ('game_nick', models.CharField(max_length=100, verbose_name='游戏昵称')),
                ('remark', models.TextField(blank=True, verbose_name='备注')),
                ('reapply', models.BooleanField(default=False, verbose_name='是否再次申请')),
                ('jilu_id', models.CharField(blank=True, max_length=32, null=True, verbose_name='原记录ID(再次申请时)')),
                ('shenheguan_id', models.CharField(blank=True, max_length=7, verbose_name='指定考核官ID')),
                ('cishu', models.IntegerField(verbose_name='本次考核次数(预计算)')),
                ('fee', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='本次费用(分账单位)')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '考核支付临时表',
                'verbose_name_plural': '考核支付临时表',
                'db_table': 'kaohe_pay_temp',
            },
        ),
        migrations.CreateModel(
            name='ShenheJilu',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('shenqingren_id', models.CharField(max_length=7, verbose_name='申请人用户ID')),
                ('shenheguan_id', models.CharField(max_length=7, null=True, verbose_name='审核官用户ID')),
                ('zhuangtai', models.IntegerField(choices=[(0, '审核中'), (1, '通过'), (2, '未通过'), (3, '待审核')], default=0, verbose_name='审核状态')),
                ('cishu', models.IntegerField(default=1, verbose_name='第几次审核')),
                ('jiaofei_jine', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, verbose_name='缴纳费用')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('UpdateTime', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('jilu_id', models.CharField(db_index=True, max_length=32, unique=True, verbose_name='记录ID')),
                ('guize_neirong', models.TextField(blank=True, null=True, verbose_name='规则内容')),
                ('shenheguan_youxi_id', models.CharField(blank=True, max_length=50, null=True, verbose_name='审核官游戏ID')),
                ('dashou_youxi_id', models.CharField(blank=True, max_length=50, null=True, verbose_name='打手游戏ID')),
                ('dashou_beizhu', models.TextField(blank=True, null=True, verbose_name='打手备注')),
                ('bankuai', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='rank.bankuai', verbose_name='审核板块')),
                ('chenghao', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='rank.chenghao', verbose_name='审核标签')),
            ],
            options={
                'verbose_name': '审核记录',
                'verbose_name_plural': '审核记录',
                'db_table': 'shenhe_jilu',
            },
        ),
        migrations.CreateModel(
            name='KaoheJujueJilu',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cishu', models.IntegerField(verbose_name='对应次数')),
                ('shenheguan_id', models.CharField(max_length=7, verbose_name='考核官用户ID')),
                ('yuanyin', models.TextField(verbose_name='拒绝原因')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('jilu', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rank.shenhejilu', to_field='jilu_id', verbose_name='审核记录')),
            ],
            options={
                'verbose_name': '拒绝原因记录',
                'verbose_name_plural': '拒绝原因记录',
                'db_table': 'kaohe_jujue_jilu',
            },
        ),
        migrations.CreateModel(
            name='KaoheJiluFeiyong',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cishu', models.IntegerField(verbose_name='第几次考核')),
                ('jine', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='缴纳金额')),
                ('jilu', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rank.shenhejilu', to_field='jilu_id', verbose_name='考核记录')),
            ],
            options={
                'verbose_name': '考核记录费用',
                'verbose_name_plural': '考核记录费用',
                'db_table': 'kaohe_jilu_feiyong',
            },
        ),
        migrations.CreateModel(
            name='KaoheguanBankuai',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kaoheguan_id', models.CharField(db_index=True, max_length=7, verbose_name='考核官用户ID')),
                ('bankuai', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rank.bankuai', verbose_name='所属板块')),
            ],
            options={
                'verbose_name': '考核官板块关联',
                'verbose_name_plural': '考核官板块关联',
                'db_table': 'kaoheguan_bankuai',
            },
        ),
        migrations.CreateModel(
            name='KaoheCishuFeiyong',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cishu', models.IntegerField(verbose_name='第几次考核')),
                ('feiyong', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='需缴纳金额')),
                ('chenghao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rank.chenghao', verbose_name='标签')),
            ],
            options={
                'verbose_name': '考核次数费用',
                'verbose_name_plural': '考核次数费用',
                'db_table': 'kaohe_cishu_feiyong',
            },
        ),
        migrations.CreateModel(
            name='JingyanJilu',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('yonghu_id', models.CharField(db_index=True, max_length=7, verbose_name='用户ID')),
                ('yonghu_leixing', models.CharField(choices=[('dashou', '打手'), ('boss', '老板'), ('shangjia', '商家'), ('guanshi', '管事'), ('zuzhang', '组长')], max_length=10, verbose_name='用户类型')),
                ('sudu_jingyan', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='上线速度经验')),
                ('shili_jingyan', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='打手实力经验')),
                ('taidu_jingyan', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='服务态度经验')),
                ('zonghe_jingyan', models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='综合经验')),
                ('dingdan_id', models.CharField(blank=True, db_index=True, max_length=32, null=True, verbose_name='关联订单ID')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('UpdateTime', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('bankuai', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='rank.bankuai', verbose_name='所属板块')),
            ],
            options={
                'verbose_name': '经验变动记录',
                'verbose_name_plural': '经验变动记录',
                'db_table': 'jingyan_jilu',
            },
        ),
        migrations.CreateModel(
            name='DingdanBiaoqian',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('chenghao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rank.chenghao', verbose_name='标签')),
                ('dingdan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orders.dingdan', to_field='dingdan_id', verbose_name='订单')),
            ],
            options={
                'verbose_name': '订单需求标签',
                'verbose_name_plural': '订单需求标签',
                'db_table': 'dingdan_biaoqian',
            },
        ),
        migrations.CreateModel(
            name='DashouBiaoxian',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dashou_id', models.CharField(db_index=True, max_length=32, verbose_name='打手ID')),
                ('shangxian_sudu', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='上线速度评价(1-5)')),
                ('fuwu_taidu', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='服务态度评价(1-5)')),
                ('fanche_cishu', models.PositiveIntegerField(blank=True, null=True, verbose_name='翻车次数')),
                ('CreateTime', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('jiedan_time', models.DateTimeField(blank=True, null=True, verbose_name='接单时间')),
                ('tijiao_time', models.DateTimeField(blank=True, null=True, verbose_name='提交时间')),
                ('bankuai', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='rank.bankuai', verbose_name='所属板块')),
                ('dingdan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='biaoxian', to='orders.dingdan', to_field='dingdan_id', verbose_name='关联订单')),
            ],
            options={
                'verbose_name': '打手订单表现',
                'verbose_name_plural': '打手订单表现',
                'db_table': 'dashou_biaoxian',
            },
        ),
        migrations.CreateModel(
            name='YonghuChenghao',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('huode_time', models.DateTimeField(auto_now_add=True, verbose_name='获得时间')),
                ('chenghao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rank.chenghao', verbose_name='称号')),
                ('yonghu', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chenghao_list', to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '用户称号关联',
                'verbose_name_plural': '用户称号关联',
                'db_table': 'yonghu_chenghao',
                'indexes': [models.Index(fields=['yonghu', 'chenghao'], name='yonghu_chen_yonghu__cac0a1_idx')],
                'unique_together': {('yonghu', 'chenghao')},
            },
        ),
        migrations.AddIndex(
            model_name='shenhejilu',
            index=models.Index(fields=['shenqingren_id', 'zhuangtai'], name='shenhe_jilu_shenqin_502e9b_idx'),
        ),
        migrations.AddIndex(
            model_name='shenhejilu',
            index=models.Index(fields=['shenheguan_id'], name='shenhe_jilu_shenheg_5c9959_idx'),
        ),
        migrations.AddIndex(
            model_name='kaohejujuejilu',
            index=models.Index(fields=['jilu_id', 'cishu'], name='kaohe_jujue_jilu_id_1f2b29_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='kaohejilufeiyong',
            unique_together={('jilu', 'cishu')},
        ),
        migrations.AddIndex(
            model_name='kaoheguanbankuai',
            index=models.Index(fields=['kaoheguan_id'], name='kaoheguan_b_kaohegu_00f7c5_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='kaoheguanbankuai',
            unique_together={('kaoheguan_id', 'bankuai')},
        ),
        migrations.AddIndex(
            model_name='kaohecishufeiyong',
            index=models.Index(fields=['chenghao', 'cishu'], name='kaohe_cishu_chengha_edc272_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='kaohecishufeiyong',
            unique_together={('chenghao', 'cishu')},
        ),
        migrations.AddIndex(
            model_name='jingyanjilu',
            index=models.Index(fields=['yonghu_id', 'bankuai', 'CreateTime'], name='jingyan_jil_yonghu__786992_idx'),
        ),
        migrations.AddIndex(
            model_name='dingdanbiaoqian',
            index=models.Index(fields=['dingdan'], name='dingdan_bia_dingdan_4d046b_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='dingdanbiaoqian',
            unique_together={('dingdan', 'chenghao')},
        ),
        migrations.AddIndex(
            model_name='dashoubiaoxian',
            index=models.Index(fields=['dashou_id', 'bankuai', 'CreateTime'], name='dashou_biao_dashou__36e1c3_idx'),
        ),
        migrations.AddIndex(
            model_name='chenghao',
            index=models.Index(fields=['leixing', 'bankuai'], name='chenghao_leixing_8f4371_idx'),
        ),
    ]
