using QYZH.InteractiveMagazine.Models.Enum;
using QYZH.InteractiveMagazine.Common.Extensions;
using QYZH.InteractiveMagazine.Common.Helpers;
using QYZH.InteractiveMagazine.Models.Enum;

namespace QYZH.InteractiveMagazine.Models.Dto.Journal
{
    public class JournalPageTaskOutput
    {
        public long Id { get; set; }

        /// <summary>
        /// 书Id
        /// </summary>
        public long JournalId { get; set; }

        /// <summary>
        /// 书页Id
        /// </summary>
        public long JournalPageId { get; set; }
        /// <summary>
        /// 任务信息
        /// </summary>
        public string Task { get; set; }
        /// <summary>
        /// 题号
        /// </summary>
        public string No { get; set; }

        /// <summary>
        /// 题型
        /// </summary>
        public TaskBankTypeEnum Type { get; set; }

        public string ShowType => Type.GetDescription();

        /// <summary>
        /// 答案列表
        /// </summary>
        public List<JournalTaskAnswerOutput> Answers { get; set; }
        /// <summary>
        /// 积分
        /// </summary>
        public float Points { get; set; }

        /// <summary>
        /// 成长值
        /// </summary>
        public float GrowthPoint { get; set; }

        /// <summary>
        /// 理解力评分
        /// </summary>
        public float Comprehension { get; set; }

        /// <summary>
        /// 判断力评分
        /// </summary>
        public float Judgment { get; set; }

        /// <summary>
        /// 表达力评分
        /// </summary>
        public float Expression { get; set; }

        /// <summary>
        /// 说服力评分
        /// </summary>
        public float Persuasiveness { get; set; }

        /// <summary>
        /// 作答参考时间(秒)
        /// </summary>
        public int AnswerTime { get; set; }

        /// <summary>
        /// Prompt配置
        /// </summary>
        public string Prompt { get; set; }

        /// <summary>
        /// 是否需要AI批改
        /// </summary>
        public bool NeedAiProcess { get; set; }
    }

    /// <summary>
    /// 答案输出
    /// </summary>
    public class JournalTaskAnswerOutput
    {
        public long Id { get; set; }

        private string _answer;
        /// <summary>
        /// 参考答案
        /// </summary>
        public string Answer
        {
            get { return _answer.AddDomain(DomainHelper.OssDomain); }
            set { _answer = value; }
        }

        private string _answerUrl;
        /// <summary>
        /// 参考答案图片
        /// </summary>
        public string AnswerUrl
        {
            get { return _answerUrl.AddDomain(DomainHelper.OssDomain); }
            set { _answerUrl = value; }
        }
    }
}
