添加高亮
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user