using IRaCIS.Core.Domain.Share; using System.Linq; namespace IRaCIS.Core.Domain.Models; [Comment("系统表格问题")] [Table("ReadingTableQuestionSystem")] public class ReadingTableQuestionSystem : BaseAddAuditEntity { #region 导航属性 [ForeignKey("DependParentId")] [JsonIgnore] public ReadingTableQuestionSystem DependParentQuestion { get; set; } [NotMapped] public List ParentTriggerValueList { get { try { return this.ParentTriggerValue.Split(',').ToList(); } catch (Exception) { return new List(); } } } [NotMapped] public List RelevanceValueList { get { try { return this.RelevanceValue.Split(',').ToList(); } catch (Exception) { return new List(); } } } #endregion [Comment("系统表的问题Id ReadingQuestionSystem的Id")] public Guid ReadingQuestionId { get; set; } public string Type { get; set; } = string.Empty; public Guid? ParentId { get; set; } [Comment("父问题触发值")] public string ParentTriggerValue { get; set; } = string.Empty; [Comment("问题名称")] public string QuestionName { get; set; } = string.Empty; public IsRequired IsRequired { get; set; } [Comment("排序号")] public int ShowOrder { get; set; } [Comment("值")] public string TypeValue { get; set; } = string.Empty; [Comment("是否启用")] public bool IsEnable { get; set; } public string Remark { get; set; } = string.Empty; [Comment("显示父问题")] public Guid? RelevanceId { get; set; } [Comment("显示父问题的值")] public string RelevanceValue { get; set; } = string.Empty; [Comment("是否显示")] public int ShowQuestion { get; set; } [Comment("最大问题数")] public int? MaxRowCount { get; set; } [Comment("数据表名称")] public string DataTableName { get; set; } = string.Empty; [Comment("数据列")] public string DataTableColumn { get; set; } = string.Empty; [Comment("关联父问题")] public Guid? DependParentId { get; set; } [Comment("是否关联")] public IsDepend IsDepend { get; set; } [Comment("表格问题类型")] public TableQuestionType? TableQuestionType { get; set; } [Comment("系统标准Id")] public Guid SystemCriterionId { get; set; } [Comment("问题标识")] public QuestionMark? QuestionMark { get; set; } [Comment("字典code")] public string DictionaryCode { get; set; } = string.Empty; [Comment("数值类型")] public ValueOfType? ValueType { get; set; } [Comment("单位")] public ValueUnit? Unit { get; set; } [Comment("问题英文名称")] public string QuestionEnName { get; set; } = string.Empty; [Comment("数据来源")] public DataSources DataSource { get; set; } = DataSources.ManualEntry; [Comment("限制编辑")] public LimitEdit LimitEdit { get; set; } = LimitEdit.None; [Comment("最大答案长度")] public int? MaxAnswerLength { get; set; } [Comment("文件类型")] public string? FileType { get; set; } = string.Empty; [Comment("问题分类")] public QuestionClassify? QuestionClassify { get; set; } }