refactor: 批量新增枚举类型并完成实体、DTO、服务层枚举替换
- 新增30+业务枚举类型覆盖用户、宠物、商城、社区、积分等模块 - 完成实体类、DTO、服务层的字符串枚举替换为强类型枚举 - 修复用户状态枚举名称变更,将Frozen改为Disabled - 新增批量发布社区消息接口与控制器实现 - 新增操作日志、积分管理、补偿任务相关服务与DTO
This commit is contained in:
98
QYZH.InteractiveMagazine.Models/Dto/Pet/PetEvolutionDto.cs
Normal file
98
QYZH.InteractiveMagazine.Models/Dto/Pet/PetEvolutionDto.cs
Normal file
@ -0,0 +1,98 @@
|
||||
using QYZH.InteractiveMagazine.Models.Enum;
|
||||
|
||||
namespace QYZH.InteractiveMagazine.Models.Dto.Pet;
|
||||
|
||||
/// <summary>
|
||||
/// 进化阶段创建/更新输入
|
||||
/// </summary>
|
||||
public class PetEvolutionInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 所属宠物模板Id
|
||||
/// </summary>
|
||||
public long TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阶段名称
|
||||
/// </summary>
|
||||
public string StageName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 阶段等级
|
||||
/// </summary>
|
||||
public int StageLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 进化所需成长值
|
||||
/// </summary>
|
||||
public int RequiredGrowth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 前一形态Id(null表示初始形态)
|
||||
/// </summary>
|
||||
public long? PreviousEvolutionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础力量
|
||||
/// </summary>
|
||||
public int BaseStrength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础敏捷
|
||||
/// </summary>
|
||||
public int BaseAgility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础智力
|
||||
/// </summary>
|
||||
public int BaseIntelligence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础魅力
|
||||
/// </summary>
|
||||
public int BaseCharm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 进化类型: Normal, Special
|
||||
/// </summary>
|
||||
public string Type { get; set; } = PetEvolutionTypeEnum.Normal.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 进化阶段输出
|
||||
/// </summary>
|
||||
public class PetEvolutionOutput
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long TemplateId { get; set; }
|
||||
public string StageName { get; set; } = string.Empty;
|
||||
public int StageLevel { get; set; }
|
||||
public int RequiredGrowth { get; set; }
|
||||
public long? PreviousEvolutionId { get; set; }
|
||||
public int BaseStrength { get; set; }
|
||||
public int BaseAgility { get; set; }
|
||||
public int BaseIntelligence { get; set; }
|
||||
public int BaseCharm { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string Status { get; set; } = string.Empty;
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public string? UpdatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 进化阶段分页查询输入
|
||||
/// </summary>
|
||||
public class PetEvolutionQueryInput : PageQueryModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 所属宠物模板Id(必填)
|
||||
/// </summary>
|
||||
public long TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阶段名称(模糊搜索)
|
||||
/// </summary>
|
||||
public string? StageName { get; set; }
|
||||
}
|
||||
131
QYZH.InteractiveMagazine.Models/Dto/Pet/PetSkinDto.cs
Normal file
131
QYZH.InteractiveMagazine.Models/Dto/Pet/PetSkinDto.cs
Normal file
@ -0,0 +1,131 @@
|
||||
using QYZH.InteractiveMagazine.Models.Enum;
|
||||
|
||||
namespace QYZH.InteractiveMagazine.Models.Dto.Pet;
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤创建/更新输入
|
||||
/// </summary>
|
||||
public class PetSkinInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 所属宠物模板Id
|
||||
/// </summary>
|
||||
public long TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤名称
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 描述/特效说明
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 稀有度: Normal, Rare, Epic, Legendary
|
||||
/// </summary>
|
||||
public string Rarity { get; set; } = "Normal";
|
||||
|
||||
/// <summary>
|
||||
/// 排序权重
|
||||
/// </summary>
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤类型: Normal, Limited, Event
|
||||
/// </summary>
|
||||
public string Type { get; set; } = PetSkinTypeEnum.Normal.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤输出
|
||||
/// </summary>
|
||||
public class PetSkinOutput
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long TemplateId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public string Rarity { get; set; } = string.Empty;
|
||||
public int SortOrder { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public string? UpdatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联的皮肤图片列表
|
||||
/// </summary>
|
||||
public List<PetSkinImageOutput>? Images { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤分页查询输入
|
||||
/// </summary>
|
||||
public class PetSkinQueryInput : PageQueryModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 所属宠物模板Id(必填)
|
||||
/// </summary>
|
||||
public long TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤名称(模糊搜索)
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 稀有度: Normal, Rare, Epic, Legendary
|
||||
/// </summary>
|
||||
public string? Rarity { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤图片创建/更新输入
|
||||
/// </summary>
|
||||
public class PetSkinImageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 皮肤Id
|
||||
/// </summary>
|
||||
public long SkinId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 进化阶段Id
|
||||
/// </summary>
|
||||
public long EvolutionStageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片地址
|
||||
/// </summary>
|
||||
public string ImageUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 图片顺序(动画帧序号)
|
||||
/// </summary>
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片类型: Normal, Special
|
||||
/// </summary>
|
||||
public string Type { get; set; } = PetSkinImageTypeEnum.Normal.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 皮肤图片输出
|
||||
/// </summary>
|
||||
public class PetSkinImageOutput
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long SkinId { get; set; }
|
||||
public long EvolutionStageId { get; set; }
|
||||
public string ImageUrl { get; set; } = string.Empty;
|
||||
public int SortOrder { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public string? UpdatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
}
|
||||
79
QYZH.InteractiveMagazine.Models/Dto/Pet/PetTemplateDto.cs
Normal file
79
QYZH.InteractiveMagazine.Models/Dto/Pet/PetTemplateDto.cs
Normal file
@ -0,0 +1,79 @@
|
||||
using QYZH.InteractiveMagazine.Models.Enum;
|
||||
|
||||
namespace QYZH.InteractiveMagazine.Models.Dto.Pet;
|
||||
|
||||
/// <summary>
|
||||
/// 宠物模板创建/更新输入
|
||||
/// </summary>
|
||||
public class PetTemplateInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板名称
|
||||
/// </summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 模板描述
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认初始进化形态Id
|
||||
/// </summary>
|
||||
public long DefaultEvolutionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板图标地址
|
||||
/// </summary>
|
||||
public string? IconUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序权重
|
||||
/// </summary>
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板类型: Normal, Special, Limited
|
||||
/// </summary>
|
||||
public string Type { get; set; } = PetTemplateTypeEnum.Normal.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 宠物模板输出
|
||||
/// </summary>
|
||||
public class PetTemplateOutput
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public long DefaultEvolutionId { get; set; }
|
||||
public string? IconUrl { get; set; }
|
||||
public int SortOrder { get; set; }
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string Status { get; set; } = string.Empty;
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public string? UpdatedBy { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 宠物模板分页查询输入
|
||||
/// </summary>
|
||||
public class PetTemplateQueryInput : PageQueryModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板名称(模糊搜索)
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板类型: Normal, Special, Limited
|
||||
/// </summary>
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态: Active, Inactive
|
||||
/// </summary>
|
||||
public string? Status { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user