refactor: 批量新增枚举类型并完成实体、DTO、服务层枚举替换

- 新增30+业务枚举类型覆盖用户、宠物、商城、社区、积分等模块
- 完成实体类、DTO、服务层的字符串枚举替换为强类型枚举
- 修复用户状态枚举名称变更,将Frozen改为Disabled
- 新增批量发布社区消息接口与控制器实现
- 新增操作日志、积分管理、补偿任务相关服务与DTO
This commit is contained in:
glz
2026-06-08 16:57:44 +08:00
parent 698c404b72
commit 78b686f9e5
116 changed files with 4861 additions and 307 deletions

View File

@ -1,4 +1,6 @@
using QYZH.InteractiveMagazine.Models.Dto;
using QYZH.InteractiveMagazine.Models.Dto.CheckIn;
using QYZH.InteractiveMagazine.Models.Dto.Compensation;
using QYZH.InteractiveMagazine.Models.Dto.Points;
namespace QYZH.InteractiveMagazine.Models.Dto;
@ -59,6 +61,78 @@ public class UsersOutput
public int GrowthPoints { get; set; }
}
/// <summary>
/// 用户详情输出DTO包含基本信息、积分记录、签到记录、补偿任务、期刊列表
/// </summary>
public class UserDetailOutput
{
/// <summary>
/// 用户基本信息
/// </summary>
public UsersOutput BasicInfo { get; set; } = new();
/// <summary>
/// 积分使用记录最近20条
/// </summary>
public List<PointsRecordOutput> PointsRecords { get; set; } = [];
/// <summary>
/// 签到记录最近30条
/// </summary>
public List<CheckInRecordOutput> CheckInRecords { get; set; } = [];
/// <summary>
/// 失败的补偿任务(需要手动处理)
/// </summary>
public List<CompensationTaskOutput> FailedCompensationTasks { get; set; } = [];
/// <summary>
/// 用户拥有的期刊列表
/// </summary>
public List<UserJournalItemOutput> Journals { get; set; } = [];
}
/// <summary>
/// 用户期刊项输出DTO
/// </summary>
public class UserJournalItemOutput
{
/// <summary>
/// 绑定记录Id
/// </summary>
public long BindId { get; set; }
/// <summary>
/// 期刊Id
/// </summary>
public long JournalId { get; set; }
/// <summary>
/// 期刊标题
/// </summary>
public string JournalTitle { get; set; } = string.Empty;
/// <summary>
/// 期刊封面
/// </summary>
public string? CoverImageUrl { get; set; }
/// <summary>
/// 绑定类型: Read, Favorite, Subscribe
/// </summary>
public string Type { get; set; } = string.Empty;
/// <summary>
/// 绑定状态
/// </summary>
public string Status { get; set; } = string.Empty;
/// <summary>
/// 绑定时间
/// </summary>
public DateTime CreatedAt { get; set; }
}
/// <summary>
/// 更新用户状态输入DTO
/// </summary>