namespace IRaCIS.Core.Domain.Models;

[Comment("后台 - 用户反馈")]
[Table("UserFeedBack")]
public class UserFeedBack : BaseFullAuditEntity
{
    #region 导航属性
    [JsonIgnore]
    public Trial Trial { get; set; }
    [JsonIgnore]
    public Subject Subject { get; set; }
    [JsonIgnore]
    public SubjectVisit SubjectVisit { get; set; }
    [JsonIgnore]
    public TrialSite TrialSite { get; set; }
    [JsonIgnore]
    public VisitTask VisitTask { get; set; }

    [NotMapped]
    public List<string> FeedBackScreenshotList => JsonConvert.DeserializeObject<List<string>>(ScreenshotListStr);
    #endregion
    public Guid? VisitTaskId { get; set; }

    public Guid? SubjectId { get; set; }
    public Guid? SubjectVisitId { get; set; }
    public int QuestionType { get; set; }

    public string QuestionDescription { get; set; } = string.Empty;
    public int State { get; set; }
    public Guid? TrialSiteId { get; set; }
    public Guid? TrialId { get; set; }

    /// <summary>
    /// 原因
    /// </summary>
    public string Reason { get; set; } = string.Empty;

    [MaxLength]
    public string ScreenshotListStr { get; set; } = string.Empty;
}
