using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infrastructure.Extention; namespace IRaCIS.Application.Contracts { public class BasicDicView: AddOrEditBasicDic { public DateTime CreateTime { get; set; } public Guid CreateUserId { get; set; } public DateTime UpdateTime { get; set; } public Guid UpdateUserId { get; set; } public string ConfigType { get; set; } = String.Empty; } public class AddOrEditBasicDic { public Guid? Id { get; set; } public string Code { get; set; } = String.Empty; public string Description { get; set; } = String.Empty; public string Value { get; set; } = String.Empty; public string ValueCN { get; set; } = String.Empty; public string ChildGroup { get; set; } = String.Empty; public int ChildCodeEnum { get; set; } public int ShowOrder { get; set; } //有父亲 就有值 public Guid? ParentId { get; set; } public bool IsEnable { get; set; } public DicDataTypeEnum DataTypeEnum { get; set; } //是配置的话,就有值 public Guid? ConfigTypeId { get; set; } } public class BasicDicSelect { public Guid Id { get; set; } public string Code { get; set; } = string.Empty; public string ValueCN { get; set; } = string.Empty; public string Value { get; set; } = string.Empty; public int ShowOrder { get; set; } public Guid? ParentId { get; set; } public string ParentCode { get; set; } = string.Empty; public int? ParentChildCodeEnum { get; set; } public string ChildGroup { get; set; } = string.Empty; public DicDataTypeEnum DataTypeEnum { get; set; } public bool IsEnumInt => System.Text.RegularExpressions.Regex.IsMatch(Code, @"^\d*$") && DataTypeEnum== DicDataTypeEnum.Enum; } public class BasicDicQuery:PageInput { public string? keyInfo { get; set; } public string? Code { get; set; } public DicDataTypeEnum? DataTypeEnum { get; set; } public Guid? ConfigTypeId { get; set; } } public class DicViewModelDTO : AddOrUpdateDicDTO { } public class AddOrUpdateDicDTO { public Guid? Id { get; set; } public string KeyName { get; set; } = String.Empty; public string Value { get; set; } = String.Empty; public string Description { get; set; } = String.Empty; public string ValueCN { get; set; } = String.Empty; public int ShowOrder { get; set; } public string Type { get; set; } = String.Empty; } public class DicQueryDTO : PageInput { public string KeyName { get; set; } = String.Empty; } public class KeyNameType { public Guid KeyId { get; set; } public string KeyName { get; set; } = String.Empty; public string Type { get; set; } = String.Empty; } public class DicResultDTO { public Dictionary> DicList = new Dictionary>(); } public class TrialDictionaryView { public Guid? Id { get; set; } public string KeyName { get; set; } = String.Empty; public string Value { get; set; } = String.Empty; public int ShowOrder { get; set; } } public class TrialDicSelect { public TrialDictionaryView[] Phase { get; set; } = new TrialDictionaryView[0]; public TrialDictionaryView[] IndicationType { get; set; } = new TrialDictionaryView[0]; public TrialDictionaryView[] DeclarationType { get; set; } = new TrialDictionaryView[0]; } }