# Generated by Django 4.2.27 on 2026-06-19 18:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AccountActivation',
            fields=[
                ('AccountActivationCode', gvsdsdk.models.FixedBinaryField(binary_length=6, db_column='AccountActivationCode', max_length=6, primary_key=True, serialize=False, verbose_name='激活码')),
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', verbose_name='用户UUID')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '账户激活',
                'verbose_name_plural': '账户激活',
                'db_table': 'AccountActivation',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='EphemeralToken',
            fields=[
                ('ELTUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='ELTUUID', primary_key=True, serialize=False, verbose_name='令牌UUID')),
                ('ELTUserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='ELTUserUUID', db_index=True, verbose_name='用户UUID')),
                ('ELTCreateTime', models.DateTimeField(db_column='ELTCreateTime', default=datetime.datetime.utcnow, verbose_name='创建时间')),
                ('ELTEndTime', models.DateTimeField(db_column='ELTEndTime', default=gvsdsdk.models._EltEndTimeDefault, verbose_name='过期时间')),
                ('ELTType', models.SmallIntegerField(db_column='ELTType', default=0, verbose_name='令牌类型')),
                ('ELTAllowIP', models.JSONField(db_column='ELTAllowIP', default=list, verbose_name='允许IP')),
                ('ELTStatus', models.SmallIntegerField(db_column='ELTStatus', db_index=True, default=1, verbose_name='状态')),
            ],
            options={
                'verbose_name': '临时令牌',
                'verbose_name_plural': '临时令牌',
                'db_table': 'EphemeralToken',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Password',
            fields=[
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', primary_key=True, serialize=False, verbose_name='用户UUID')),
                ('Password', models.CharField(db_column='Password', max_length=1024, verbose_name='密码哈希')),
            ],
            options={
                'verbose_name': '密码',
                'verbose_name_plural': '密码',
                'db_table': 'Password',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('PermUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PermUUID', primary_key=True, serialize=False, verbose_name='权限UUID')),
                ('TenantUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='TenantUUID', verbose_name='租户UUID')),
                ('PermName', models.CharField(db_column='PermName', max_length=128, verbose_name='权限名称')),
                ('PermCode', models.CharField(db_column='PermCode', max_length=128, verbose_name='权限键')),
                ('PermCategory', models.CharField(db_column='PermCategory', default='', max_length=64, verbose_name='权限分类')),
                ('PermStatus', models.SmallIntegerField(db_column='PermStatus', default=1, verbose_name='是否启用')),
                ('PermDesc', models.CharField(db_column='PermDesc', default='', max_length=512, verbose_name='描述')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '权限',
                'verbose_name_plural': '权限',
                'db_table': 'Permission',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('PositionUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PositionUUID', primary_key=True, serialize=False, verbose_name='职务UUID')),
                ('TenantUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='TenantUUID', verbose_name='租户UUID')),
                ('PositionName', models.CharField(db_column='PositionName', max_length=128, verbose_name='职务名称')),
                ('PositionCode', models.CharField(db_column='PositionCode', default='', max_length=64, verbose_name='职务编码')),
                ('PositionLevel', models.SmallIntegerField(db_column='PositionLevel', default=0, verbose_name='职务级别')),
                ('PositionStatus', models.SmallIntegerField(db_column='PositionStatus', default=1, verbose_name='状态')),
                ('PositionDesc', models.CharField(db_column='PositionDesc', default='', max_length=512, verbose_name='描述')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
                ('UpdateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '人事职务标签',
                'verbose_name_plural': '人事职务标签',
                'db_table': 'Position',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='PositionTemplate',
            fields=[
                ('PositionTemplateUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PositionTemplateUUID', primary_key=True, serialize=False, verbose_name='岗位模板UUID')),
                ('TenantUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='TenantUUID', verbose_name='租户UUID')),
                ('TemplateName', models.CharField(db_column='TemplateName', max_length=128, verbose_name='模板名称')),
                ('TemplateCode', models.CharField(db_column='TemplateCode', default='', max_length=64, verbose_name='模板编码')),
                ('TemplateStatus', models.SmallIntegerField(db_column='TemplateStatus', default=1, verbose_name='模板状态')),
                ('TemplateDesc', models.CharField(db_column='TemplateDesc', default='', max_length=512, verbose_name='模板描述')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
                ('UpdateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '岗位模板',
                'verbose_name_plural': '岗位模板',
                'db_table': 'PositionTemplate',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='PositionTemplatePermission',
            fields=[
                ('PTPermUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PTPermUUID', primary_key=True, serialize=False, verbose_name='关联UUID')),
                ('PositionTemplateUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PositionTemplateUUID', verbose_name='岗位模板UUID')),
                ('PermUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PermUUID', verbose_name='权限UUID')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '岗位模板权限关联',
                'verbose_name_plural': '岗位模板权限关联',
                'db_table': 'PositionTemplatePermission',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('RoleUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='RoleUUID', primary_key=True, serialize=False, verbose_name='角色UUID')),
                ('TenantUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='TenantUUID', verbose_name='租户UUID')),
                ('RoleName', models.CharField(db_column='RoleName', max_length=128, verbose_name='角色名称')),
                ('RoleType', models.SmallIntegerField(db_column='RoleType', default=2, verbose_name='角色类型')),
                ('RoleStatus', models.SmallIntegerField(db_column='RoleStatus', default=1, verbose_name='角色状态')),
                ('AssignScope', models.SmallIntegerField(db_column='AssignScope', default=0, verbose_name='分配可见范围')),
                ('AssignScopeUUID', gvsdsdk.models.UUIDField(binary_length=16, blank=True, db_column='AssignScopeUUID', null=True, verbose_name='分配范围UUID')),
                ('RoleDesc', models.CharField(db_column='RoleDesc', default='', max_length=512, verbose_name='角色描述')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '角色',
                'verbose_name_plural': '角色',
                'db_table': 'Role',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='RolePermission',
            fields=[
                ('RolePermUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='RolePermUUID', primary_key=True, serialize=False, verbose_name='关联UUID')),
                ('RoleUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='RoleUUID', verbose_name='角色UUID')),
                ('PermUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PermUUID', verbose_name='权限UUID')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '角色权限关联',
                'verbose_name_plural': '角色权限关联',
                'db_table': 'RolePermission',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='RoleShop',
            fields=[
                ('RoleShopUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='RoleShopUUID', primary_key=True, serialize=False, verbose_name='关联UUID')),
                ('RoleUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='RoleUUID', verbose_name='角色UUID')),
                ('ShopUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='ShopUUID', verbose_name='商铺UUID')),
                ('IsMainShop', models.SmallIntegerField(db_column='IsMainShop', default=0, verbose_name='主商铺')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '角色商铺关联',
                'verbose_name_plural': '角色商铺关联',
                'db_table': 'RoleShop',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('ShopUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='ShopUUID', primary_key=True, serialize=False, verbose_name='商铺UUID')),
                ('CompanyUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='CompanyUUID', verbose_name='公司UUID')),
                ('ShopName', models.CharField(db_column='ShopName', max_length=128, verbose_name='商铺名称')),
                ('ShopCode', models.CharField(db_column='ShopCode', default='', max_length=64, verbose_name='商铺编码')),
                ('ShopType', models.SmallIntegerField(db_column='ShopType', default=0, verbose_name='商铺类型')),
                ('ShopStatus', models.SmallIntegerField(db_column='ShopStatus', default=1, verbose_name='商铺状态')),
                ('ShopAddress', models.CharField(db_column='ShopAddress', default='', max_length=512, verbose_name='商铺地址')),
                ('ShopContact', models.CharField(db_column='ShopContact', default='', max_length=128, verbose_name='联系人')),
                ('ShopPhone', models.CharField(db_column='ShopPhone', default='', max_length=32, verbose_name='联系电话')),
                ('ShopDesc', models.CharField(db_column='ShopDesc', default='', max_length=512, verbose_name='描述')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
                ('UpdateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '商铺',
                'verbose_name_plural': '商铺',
                'db_table': 'Shop',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='User2FA',
            fields=[
                ('User2FAUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='User2FAUUID', primary_key=True, serialize=False, verbose_name='2FA UUID')),
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', db_index=True, verbose_name='用户UUID')),
                ('SecretKey', models.CharField(db_column='SecretKey', max_length=64, verbose_name='密钥')),
                ('IsEnabled', models.SmallIntegerField(db_column='IsEnabled', default=0, verbose_name='是否启用')),
                ('Verified', models.SmallIntegerField(db_column='Verified', default=0, verbose_name='已验证')),
                ('LastUsedAt', models.DateTimeField(blank=True, db_column='LastUsedAt', null=True, verbose_name='最后使用')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '双因素认证',
                'verbose_name_plural': '双因素认证',
                'db_table': 'User2FA',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserABAC',
            fields=[
                ('UserABACUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserABACUUID', primary_key=True, serialize=False, verbose_name='ABAC UUID')),
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', verbose_name='用户UUID')),
                ('HierarchicalPermissionIdentifiers', models.CharField(db_column='HierarchicalPermissionIdentifiers', max_length=256, verbose_name='层级权限标识')),
            ],
            options={
                'verbose_name': '用户ABAC',
                'verbose_name_plural': '用户ABAC',
                'db_table': 'UserABAC',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserAvatar',
            fields=[
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', primary_key=True, serialize=False, verbose_name='用户UUID')),
                ('UserAvatar', models.BinaryField(db_column='UserAvatar', editable=True, verbose_name='头像数据')),
                ('AvatarUploadTime', models.DateTimeField(db_column='AvatarUploadTime', default=datetime.datetime.utcnow, verbose_name='上传时间')),
                ('AvatarFileType', models.CharField(db_column='AvatarFileType', default='png', max_length=16, verbose_name='文件类型')),
            ],
            options={
                'verbose_name': '用户头像',
                'verbose_name_plural': '用户头像',
                'db_table': 'UserAvatar',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserDept',
            fields=[
                ('UserDeptUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserDeptUUID', primary_key=True, serialize=False, verbose_name='关联UUID')),
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', verbose_name='用户UUID')),
                ('DeptUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='DeptUUID', verbose_name='部门UUID')),
                ('PositionUUID', gvsdsdk.models.UUIDField(binary_length=16, blank=True, db_column='PositionUUID', null=True, verbose_name='职务标签UUID')),
                ('IsMainDept', models.SmallIntegerField(db_column='IsMainDept', default=1, verbose_name='是否主部门')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '员工部门关联',
                'verbose_name_plural': '员工部门关联',
                'db_table': 'UserDept',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserLoginLog',
            fields=[
                ('LogUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='LogUUID', primary_key=True, serialize=False, verbose_name='日志UUID')),
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', db_index=True, verbose_name='用户UUID')),
                ('LoginIP', models.CharField(db_column='LoginIP', max_length=39, verbose_name='登录IP')),
                ('LoginPlatform', models.CharField(db_column='LoginPlatform', max_length=32, verbose_name='登录平台')),
                ('LoginStatus', models.SmallIntegerField(db_column='LoginStatus', verbose_name='登录状态')),
                ('LoginTime', models.DateTimeField(db_column='LoginTime', default=datetime.datetime.utcnow, verbose_name='登录时间')),
                ('UserAgent', models.CharField(db_column='UserAgent', default='', max_length=512, verbose_name='用户代理')),
            ],
            options={
                'verbose_name': '登录日志',
                'verbose_name_plural': '登录日志',
                'db_table': 'UserLoginLog',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserPending2FA',
            fields=[
                ('PendingUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='PendingUUID', primary_key=True, serialize=False, verbose_name='待确认UUID')),
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', unique=True, verbose_name='用户UUID')),
                ('SecretKey', models.CharField(db_column='SecretKey', max_length=64, verbose_name='密钥')),
                ('ExpireAt', models.DateTimeField(db_column='ExpireAt', verbose_name='过期时间')),
            ],
            options={
                'verbose_name': '2FA待确认',
                'verbose_name_plural': '2FA待确认',
                'db_table': 'UserPending2FA',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='UserRole',
            fields=[
                ('UserRoleUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserRoleUUID', primary_key=True, serialize=False, verbose_name='关联UUID')),
                ('UserUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='UserUUID', verbose_name='用户UUID')),
                ('RoleUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='RoleUUID', verbose_name='角色UUID')),
                ('CompanyUUID', gvsdsdk.models.UUIDField(binary_length=16, db_column='CompanyUUID', verbose_name='公司UUID')),
                ('CreateTime', models.DateTimeField(default=datetime.datetime.utcnow, verbose_name='创建时间')),
            ],
            options={
                'verbose_name': '用户角色关联',
                'verbose_name_plural': '用户角色关联',
                'db_table': 'UserRole',
                'managed': True,
            },
        ),
    ]
