namespace QYZH.InteractiveMagazine.Models.Dto; /// /// 操作类型常量 /// public static class OperationLogActionType { /// /// 手动增加积分 /// public const string ManualAddPoints = "ManualAddPoints"; /// /// 手动扣除积分 /// public const string ManualDeductPoints = "ManualDeductPoints"; /// /// 补偿任务手动重试 /// public const string CompensationRetry = "CompensationRetry"; /// /// 补偿任务标记已解决 /// public const string CompensationResolve = "CompensationResolve"; } /// /// 目标类型常量 /// public static class OperationLogTargetType { /// /// 用户 /// public const string User = "User"; /// /// 补偿任务 /// public const string CompensationTask = "CompensationTask"; } /// /// 操作日志分页查询输入 /// public class OperationLogQueryInput : PageQueryModel { /// /// 按操作人用户名筛选(模糊查询) /// public string? OperatorName { get; set; } /// /// 按操作类型筛选 /// public string? ActionType { get; set; } /// /// 按目标类型筛选 /// public string? TargetType { get; set; } /// /// 按目标记录Id筛选 /// public long? TargetId { get; set; } } /// /// 操作日志输出 /// public class OperationLogOutput { /// /// 记录Id /// public long Id { get; set; } /// /// 操作人Id /// public long OperatorId { get; set; } /// /// 操作人用户名 /// public string OperatorName { get; set; } = string.Empty; /// /// 操作类型 /// public string ActionType { get; set; } = string.Empty; /// /// 目标类型 /// public string TargetType { get; set; } = string.Empty; /// /// 目标记录Id /// public long TargetId { get; set; } /// /// 目标名称 /// public string? TargetName { get; set; } /// /// 操作详情 /// public string? Detail { get; set; } /// /// IP地址 /// public string? IpAddress { get; set; } /// /// 操作时间 /// public DateTime CreatedAt { get; set; } } /// /// 操作日志详情输出 /// public class OperationLogDetailOutput { /// /// 记录Id /// public long Id { get; set; } /// /// 操作类型 /// public string ActionType { get; set; } = string.Empty; /// /// 目标类型 /// public string TargetType { get; set; } = string.Empty; /// /// 目标记录Id /// public long TargetId { get; set; } /// /// 目标名称 /// public string? TargetName { get; set; } /// /// 操作详情 /// public string? Detail { get; set; } /// /// IP地址 /// public string? IpAddress { get; set; } /// /// 操作时间 /// public DateTime CreatedAt { get; set; } /// /// 操作人用户名 /// public string OperatorName { get; set; } = string.Empty; /// /// 操作人手机号(管理员表无此字段时可为空) /// public string? OperatorPhone { get; set; } /// /// 操作人角色/类型 /// public string? OperatorRole { get; set; } /// /// 被操作人用户名(当 TargetType 为 User 时) /// public string? TargetUserName { get; set; } /// /// 被操作人手机号(当 TargetType 为 User 时) /// public string? TargetUserPhone { get; set; } /// /// 被操作人头像(当 TargetType 为 User 时) /// public string? TargetUserAvatar { get; set; } }