using MadRunFabric.Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace MadRunFabric.Model.CallCenterApi
{
    /// <summary>
    /// 问卷
    /// </summary>
    public class Ask_QuestionPager : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        /// <summary>
        /// 问卷名称
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// 题目数量
        /// </summary>
        public int totalnum { get; set; } = 0;
        /// <summary>
        /// 发起问卷(0暂停1开启)
        /// </summary>
        public int isopen { get; set; } = 0;
        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; } = 0;
        /// <summary>
        /// 备注 - 问卷内容简述
        /// </summary>
        public string remark { get; set; }
        /// <summary>
        /// 问卷开场语
        /// </summary>
        public string starttext { get; set; }
        /// <summary>
        /// 问卷结束语
        /// </summary>
        public string endtext { get; set; }

        /// <summary>
        /// 创建人工号
        /// </summary>
        public string createuser { get; set; }
        /// <summary>
        /// 创建人姓名
        /// </summary>
        public string createusername { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime createtime { get; set; } = DateTime.Now;
        /// <summary>
        /// 是否删除(0正常1删除)
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 删除工号
        /// </summary>
        public string deleteuser { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? deletetime { get; set; }
    }

    /// <summary>
    /// 试题
    /// </summary>
    public class resultPageQuestion
    {
        public string queid { get; set; }
        public string quetitle { get; set; }
        public int type { get; set; }
        public bool isanswer { get; set; }
        public string remark { get; set; }
        public int sort { get; set; }
        /// <summary>
        /// 单选选项前端guid - 跳转逻辑使用
        /// </summary>
        public string queguid { get; set; }
        public List<resultQuestionItem> itemList { get; set; } = new List<resultQuestionItem>();
    }

    /// <summary>
    /// 选项
    /// </summary>
    public class resultQuestionItem
    {
        public string itemid { get; set; }
        public string name { get; set; }
        public int sort { get; set; }
        /// <summary>
        /// 单选选项 选择时跳转试题guid  - 为空不跳转，不为空跳转对应guid试题
        /// </summary>
        public string queguid { get; set; }
        /// <summary>
        /// 是否选中（0未选中1选中）
        /// </summary>
        public int ischeck { get; set; } = 0;
    }
}
