refactor: 重构用户与勋章体系,统一状态管理与数据结构
1. 新增通用默认状态枚举 DefaultStatusEnum,替换原有分散的状态枚举 2. 重构用户体系:拆分 WxUser 独立表存储微信身份,Users 表改为角色子用户表并关联 WxUser 3. 重构勋章模块:新增系统/期刊勋章类型,调整 JournalId 为可空,新增勋章状态字段 4. 重构微信认证流程:基于 WxUser 生成 Token,支持多子用户管理 5. 清理冗余枚举文件,重构多处业务逻辑适配新的数据结构 6. 修复用户手机号关联逻辑,迁移手机号字段至 WxUser 表
This commit is contained in:
@ -4,69 +4,58 @@ using QYZH.InteractiveMagazine.Models.Enum;
|
||||
namespace QYZH.InteractiveMagazine.Models.Entity
|
||||
{
|
||||
///<summary>
|
||||
///用户表
|
||||
///用户表 — 游戏/角色数据,关联 WxUser
|
||||
///</summary>
|
||||
[SugarTable("Users")]
|
||||
public partial class Users : SqlSugarBaseEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Desc:关联微信用户Id
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long WxUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:昵称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:当前成长值
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public int GrowthPoints { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:头像地址
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public string AvatarUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:积分余额
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public int Points { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:用户类型: Normal, VIP
|
||||
/// Default:Normal
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public UsersTypeEnum Type { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:微信OpenId
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string OpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:微信UnionId
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string UnionId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:手机号
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否上次在线用户
|
||||
/// Default:0
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public bool IsLastOnline { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user