# Generated for jituan multi-club platform

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Club',
            fields=[
                ('club_id', models.CharField(max_length=16, primary_key=True, serialize=False, verbose_name='俱乐部ID')),
                ('name', models.CharField(max_length=64, verbose_name='展示名')),
                ('status', models.IntegerField(default=1, verbose_name='1启用0停用')),
                ('wx_appid', models.CharField(blank=True, default='', max_length=32)),
                ('wx_secret', models.CharField(blank=True, default='', max_length=128)),
                ('mch_id', models.CharField(blank=True, default='', max_length=32)),
                ('pay_app_id', models.CharField(blank=True, default='', max_length=32)),
                ('api_v3_key', models.CharField(blank=True, default='', max_length=128)),
                ('cert_serial_no', models.CharField(blank=True, default='', max_length=64)),
                ('private_key_path', models.CharField(blank=True, default='', max_length=255)),
                ('platform_cert_dir', models.CharField(blank=True, default='', max_length=255)),
                ('official_appid', models.CharField(blank=True, default='', max_length=32)),
                ('official_secret', models.CharField(blank=True, default='', max_length=128)),
                ('official_token', models.CharField(blank=True, default='', max_length=64)),
                ('encoding_aes_key', models.CharField(blank=True, default='', max_length=64)),
                ('template_id', models.CharField(blank=True, default='', max_length=64)),
                ('template_max_per_minute', models.IntegerField(default=950)),
                ('h5_domain', models.CharField(blank=True, default='', max_length=128)),
                ('oss_prefix', models.CharField(blank=True, default='', max_length=128)),
                ('goeasy_appkey', models.CharField(blank=True, default='', max_length=64)),
                ('goeasy_secret', models.CharField(blank=True, default='', max_length=128)),
                ('config_json', models.JSONField(blank=True, default=dict)),
                ('company_uuid', models.BinaryField(blank=True, null=True)),
                ('sort_order', models.IntegerField(default=0)),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': '俱乐部',
                'db_table': 'club',
            },
        ),
        migrations.CreateModel(
            name='UserWxOpenid',
            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)),
                ('openid', models.CharField(db_index=True, max_length=64)),
                ('yonghuid', models.CharField(db_index=True, max_length=7, verbose_name='用户ID')),
                ('unionid', models.CharField(blank=True, max_length=64, null=True)),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'user_wx_openid',
                'unique_together': {('club_id', 'openid')},
            },
        ),
        migrations.CreateModel(
            name='AdminAssignment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('yonghuid', models.CharField(db_index=True, max_length=7)),
                ('club_id', models.CharField(blank=True, db_index=True, max_length=16, null=True, verbose_name='NULL=集团任职')),
                ('role_code', models.CharField(default='CLUB_ADMIN', max_length=50)),
                ('data_scope', models.CharField(default='SINGLE_CLUB', max_length=20)),
                ('is_primary', models.BooleanField(default=False)),
                ('granted_by', models.CharField(blank=True, default='', max_length=7)),
                ('status', models.IntegerField(default=1, verbose_name='1有效0停用')),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'admin_assignment',
                'unique_together': {('yonghuid', 'club_id', 'role_code')},
            },
        ),
        migrations.CreateModel(
            name='AdminAuditLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('club_id', models.CharField(blank=True, db_index=True, max_length=16, null=True)),
                ('operator_yonghuid', models.CharField(db_index=True, max_length=7)),
                ('operator_role_code', models.CharField(blank=True, default='', max_length=50)),
                ('target_yonghuid', models.CharField(blank=True, max_length=7, null=True)),
                ('action', models.CharField(db_index=True, max_length=64)),
                ('resource_type', models.CharField(blank=True, default='', max_length=32)),
                ('resource_id', models.CharField(blank=True, default='', max_length=64)),
                ('field_name', models.CharField(blank=True, default='', max_length=64)),
                ('value_before', models.TextField(blank=True, null=True)),
                ('value_after', models.TextField(blank=True, null=True)),
                ('request_ip', models.CharField(blank=True, default='', max_length=64)),
                ('remark', models.CharField(blank=True, default='', max_length=500)),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'admin_audit_log',
                'indexes': [models.Index(fields=['club_id', '-CreateTime'], name='admin_audit_club_time_idx')],
            },
        ),
        migrations.CreateModel(
            name='ClubHuiyuanPrice',
            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)),
                ('huiyuan_id', models.CharField(db_index=True, max_length=6)),
                ('jiage', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('guanshifc', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('zuzhangfc', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
                ('is_enabled', models.BooleanField(default=True)),
                ('bankuai_id', models.IntegerField(blank=True, null=True)),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'club_huiyuan_price',
                'unique_together': {('club_id', 'huiyuan_id')},
            },
        ),
        migrations.CreateModel(
            name='ClubLilubiao',
            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)),
                ('config_type', models.IntegerField(db_index=True, verbose_name='同 lilubiao.fadanpingtai')),
                ('lilv', models.DecimalField(decimal_places=4, default=0, max_digits=10)),
                ('remark', models.CharField(blank=True, default='', max_length=255)),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'club_lilubiao',
                'unique_together': {('club_id', 'config_type')},
            },
        ),
        migrations.CreateModel(
            name='ClubWithdrawConfig',
            fields=[
                ('club_id', models.CharField(max_length=16, primary_key=True, serialize=False)),
                ('mode', models.IntegerField(default=1, verbose_name='1自动2手动')),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'club_withdraw_config',
            },
        ),
        migrations.CreateModel(
            name='ClubTixianQuota',
            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)),
                ('leixing', models.IntegerField(db_index=True)),
                ('daily_limit', models.DecimalField(decimal_places=2, default=0, max_digits=12)),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'club_tixian_quota',
                'unique_together': {('club_id', 'leixing')},
            },
        ),
        migrations.CreateModel(
            name='ClubFadanFenhongLilv',
            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)),
                ('shenfen', models.IntegerField(db_index=True)),
                ('lilv', models.DecimalField(decimal_places=4, default=0, max_digits=10)),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'club_fadan_fenhong_lilv',
                'unique_together': {('club_id', 'shenfen')},
            },
        ),
    ]
