导航属性优化整理
continuous-integration/drone/push Build is passing

This commit is contained in:
hang
2024-08-22 20:10:59 +08:00
parent 4319982be9
commit 47ec4a5e7e
142 changed files with 1860 additions and 2493 deletions
@@ -13,12 +13,88 @@ namespace IRaCIS.Core.Domain.Models
/// 系统阅片问题
///</summary>
[Table("ReadingQuestionSystem")]
public class ReadingQuestionSystem : BaseAuditAddEntity
{
/// <summary>
/// 系统标准Id
/// </summary>
public Guid ReadingQuestionCriterionSystemId { get; set; }
public class ReadingQuestionSystem : BaseAddAuditEntity
{
#region
[JsonIgnore]
[ForeignKey("GroupId")]
public ReadingQuestionSystem GroupInfo { get; set; }
[JsonIgnore]
[ForeignKey("ReadingQuestionCriterionSystemId")]
public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; }
[JsonIgnore]
[ForeignKey("ParentId")]
public ReadingQuestionSystem ParentReadingQuestionSystem { get; set; }
[JsonIgnore]
[ForeignKey("RelevanceId")]
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
[NotMapped]
public List<string> ParentTriggerValueList
{
get
{
try
{
return this.ParentTriggerValue.Split(',').ToList();
}
catch (Exception)
{
return new List<string>();
}
}
}
[NotMapped]
public List<string> RelevanceValueList
{
get
{
try
{
return this.RelevanceValue.Split(',').ToList();
}
catch (Exception)
{
return new List<string>();
}
}
}
[NotMapped]
public List<string> HighlightAnswerList
{
get
{
try
{
var result = JsonConvert.DeserializeObject<List<string>>(this.HighlightAnswer);
return result == null ? new List<string>() : result;
}
catch (Exception)
{
return new List<string>();
}
}
}
#endregion
/// <summary>
/// 系统标准Id
/// </summary>
public Guid ReadingQuestionCriterionSystemId { get; set; }
/// <summary>
/// 类型
@@ -214,80 +290,7 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public string HighlightAnswer { get; set; } = "[]";
[JsonIgnore]
[ForeignKey("GroupId")]
public ReadingQuestionSystem GroupInfo { get; set; }
[JsonIgnore]
[ForeignKey("ReadingQuestionCriterionSystemId")]
public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; }
[JsonIgnore]
[ForeignKey("ParentId")]
public ReadingQuestionSystem ParentReadingQuestionSystem { get; set; }
[JsonIgnore]
[ForeignKey("RelevanceId")]
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
[NotMapped]
public List<string> ParentTriggerValueList
{
get
{
try
{
return this.ParentTriggerValue.Split(',').ToList();
}
catch (Exception)
{
return new List<string>();
}
}
}
[NotMapped]
public List<string> RelevanceValueList
{
get
{
try
{
return this.RelevanceValue.Split(',').ToList();
}
catch (Exception)
{
return new List<string>();
}
}
}
[NotMapped]
public List<string> HighlightAnswerList
{
get
{
try
{
var result = JsonConvert.DeserializeObject<List<string>>(this.HighlightAnswer);
return result == null ? new List<string>() : result;
}
catch (Exception)
{
return new List<string>();
}
}
}
}