namespace Store.Modules.CloudProduct.Dtos; public class ViolationReasonDto { public uint Id { get; set; } public string Name { get; set; } = string.Empty; public bool IsViolation { get; set; } } public class ReportGoodsViolationItem { public long GoodsId { get; set; } /// 原因名称,例如“出售假冒商品”;新名称默认仅记录字典,不判定违规。 public string Reasons { get; set; } = string.Empty; } public class ReportGoodsViolationsResult { public long GoodsId { get; set; } /// 存在违规记录且已完成索引下架时为 true,否则为 false。 public bool IsOffShelf { get; set; } } public class GoodsViolationStatus { public long GoodsId { get; set; } public bool IsViolation { get; set; } /// 当前商品命中的违规原因,供客户端记录实际处理动作。 public int[] ReasonIds { get; set; } = []; } public class RemoveGoodsViolationsResult { public int RemovedCount { get; set; } public long[] RestoredGoodsIds { get; set; } = []; public long[] PendingRestoreGoodsIds { get; set; } = []; /// 商品不存在、已删除或恢复期间再次被上报违规的编号。 public long[] SkippedGoodsIds { get; set; } = []; } /// 日志记录的实际业务动作,与商品违规原因分别保存。 public enum ViolationLogAction { Report = 1, AutoListingExcluded = 2, AutoOffShelf = 3 } /// 客户端在店铺动作完成后提交一条日志。 public sealed class RecordViolationLogRequest { public string ShopId { get; set; } = string.Empty; public long GoodsId { get; set; } /// 违规类型在 violation_reason 中的编号。 public int ReasonId { get; set; } public ViolationLogAction Action { get; set; } } /// 按商铺编号查询违规日志;翻页时传入上一页最后一条日志的编号。 public sealed class GetViolationLogsRequest { public string[] ShopIds { get; set; } = []; public long? GoodsId { get; set; } public long BeforeId { get; set; } public int Size { get; set; } = 50; }