using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Hg.Core.Domain.Dto.InComplaint { public class InComplaintDto { public int Id { get; set; } public string? ComplaintId { get; set; } public string? Resid { get; set; } public string? UMID { get; set; } public string? Cname { get; set; } public int? Deptid { get; set; } public string? Deptname { get; set; } public int? Eid { get; set; } public string Euser { get; set; } public int? InComplaintChannel { get; set; } public List? InComplaintChannels { get { var data = new List(); foreach (var item in Enum.GetValues()) { if (InComplaintChannel.HasValue && ((int)item & InComplaintChannel.Value) > 0) { data.Add((int)item); } } return data == null ? null : data; } } public List? InComplaintChannelList { get { var data = new List(); foreach (var item in Enum.GetValues()) { if (InComplaintChannel.HasValue && ((int)item & InComplaintChannel.Value) > 0) { data.Add(item.GetDescription()); } } return data == null ? null : data; } } public int? Reason { get; set; } public List? Reasons { get { var reasons = new List(); foreach (var reason in Enum.GetValues()) { if (Reason.HasValue && ((int)reason & Reason.Value) > 0) { reasons.Add((int)reason); } } return Reason == null ? null : reasons; } } public List? ReasonList { get { var reasons = new List(); foreach (var reason in Enum.GetValues()) { if (Reason.HasValue && ((int)reason & Reason.Value) > 0) { reasons.Add(reason.GetDescription()); } } return Reason == null ? null : reasons; } } public InComplaintStatus? InComplaintStatus { get; set; } public string? InComplaintStatusStr { get { return InComplaintStatus?.GetDescription(); } } public InComplaintBusinessStatus? BusinessStatus { get; set; } public string? BusinessStatusStr { get { return BusinessStatus?.GetDescription(); } } public string? Content { get; set; } public string? Follow { get; set; } public string? Remark { get; set; } public InComplaintDueStatus? DueStatus { get; set; } public string? DueStatusStr { get { return DueStatus?.GetDescription(); } } public DateTime BusinessDeadline { get; set; } public string? BusinessDeadlineSpan { get; set; } public DateTime? InComplaintDate { get; set; } public string? InComplaintDateStr { get { return InComplaintDate?.ToString("yyyy-MM-dd"); } } public string? Creator { get; set; } public DateTime? CreateTime { get; set; } public string? Updater { get; set; } public DateTime? UpdateTime { get; set; } public string? Restorer { get; set; } public DateTime? RestoreTime { get; set; } public string? HGRestorer { get; set; } public DateTime? HGRestoreTime { get; set; } public ICollection OrderList { get; set; } public ICollection PriceList { get; set; } public int NeedRestoreCount { get; set; } public int RestoreCount { get; set; } public int FollowUpCount { get; set; } public int DueCount { get; set; } public bool IsAdjustDeadline { get; set; } public DateTime TimeSort { get; set; } public int? Age { get; set; } public List? Products { get; set; } public List? OrderIds { get; set; } public List OTimes { get; set; } public List ArrivalPays { get; set; } public List? ArrivalStatus { get; set; } public string? Verifyier { get; set; } public DateTime? VerifyTime { get; set; } public string IsOutComplaint { get; set; } public string? RiskSituation { get; set; } public int? ComplaintCycle { get; set; } public OrderRefundStatus? RefundStatus { get; set; } public string? RefundStatusStr { get { return RefundStatus?.GetDescription(); } } } }