using System.Runtime.Serialization; using System.Text.Json.Serialization; namespace YLErp.Modules.RiskEngine.Dto { [JsonConverter(typeof(JsonStringEnumConverter))] public enum BatchOperationOutcome { [EnumMember(Value = "AllSucceeded")] AllSucceeded, [EnumMember(Value = "PartiallySucceeded")] PartiallySucceeded, [EnumMember(Value = "AllFailed")] AllFailed } [JsonConverter(typeof(JsonStringEnumConverter))] public enum BatchOperationItemStatus { [EnumMember(Value = "Succeeded")] Succeeded, [EnumMember(Value = "Unchanged")] Unchanged, [EnumMember(Value = "Failed")] Failed } public class BatchOperationItemResult { public long Id { get; set; } public BatchOperationItemStatus Status { get; set; } public string Code { get; set; } public string Message { get; set; } public List CascadedApplicationIds { get; set; } = new List(); } public class BatchOperationResult { public BatchOperationOutcome Outcome { get; set; } public int TotalCount { get; set; } public int SucceededCount { get; set; } public int UnchangedCount { get; set; } public int FailedCount { get; set; } public bool HasChanges { get; set; } public List Items { get; set; } = new List(); public List CascadedApplicationIds { get; set; } = new List(); } }