添加高亮

This commit is contained in:
he
2024-07-18 10:05:26 +08:00
parent d9fc5e3646
commit 924ba90384
12 changed files with 130 additions and 19 deletions
@@ -217,7 +217,12 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public QuestionClassify? QuestionClassify { get; set; }
[JsonIgnore]
/// <summary>
/// 高亮问题的答案
/// </summary>
public string HighlightAnswer { get; set; } = "[]";
[JsonIgnore]
[ForeignKey("GroupId")]
public ReadingQuestionSystem GroupInfo { get; set; }
@@ -272,6 +277,26 @@ namespace IRaCIS.Core.Domain.Models
}
[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>();
}
}
}
}