namespace Tiobon.Core.Model.ViewModels.Extend;


public class Ghre_SurveyExtendBase
{
    /// <summary>
    /// 封面图
    /// </summary>
    [Display(Name = "CoverImageUrl"), Description("封面图"), MaxLength(128, ErrorMessage = "封面图 不能超过 128 个字符")]
    public string CoverImageUrl { get; set; }

    /// <summary>
    /// 问卷编号
    /// </summary>
    [Display(Name = "SurveyNo"), Description("问卷编号"), MaxLength(32, ErrorMessage = "问卷编号 不能超过 32 个字符")]
    public string SurveyNo { get; set; }

    /// <summary>
    /// 问卷名称
    /// </summary>
    [Display(Name = "SurveyName"), Description("问卷名称"), MaxLength(64, ErrorMessage = "问卷名称 不能超过 64 个字符")]
    public string SurveyName { get; set; }

    /// <summary>
    /// 问卷显示名称
    /// </summary>
    [Display(Name = "SurveyDisplayName"), Description("问卷显示名称"), MaxLength(64, ErrorMessage = "问卷显示名称 不能超过 64 个字符")]
    public string SurveyDisplayName { get; set; }

    /// <summary>
    /// 分类
    /// </summary>
    [Display(Name = "SurveyClass"), Description("分类"), MaxLength(32, ErrorMessage = "分类 不能超过 32 个字符")]
    public string SurveyClass { get; set; }

    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? BeginTime { get; set; }

    /// <summary>
    /// 结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }

    /// <summary>
    /// 结束语
    /// </summary>
    [Display(Name = "ClosingRemark"), Description("结束语"), MaxLength(2000, ErrorMessage = "结束语 不能超过 2000 个字符")]
    public string ClosingRemark { get; set; }

    /// <summary>
    /// 是否允许查看结果
    /// </summary>
    public bool? IsAllowViewResult { get; set; }

    /// <summary>
    /// 是否需要登录
    /// </summary>
    public bool? IsRequireLogin { get; set; }

    /// <summary>
    /// 是否匿名
    /// </summary>
    public bool? IsAnonymous { get; set; }

    /// <summary>
    /// 是否积分奖励
    /// </summary>
    public bool? IsRewardPoint { get; set; }

    /// <summary>
    /// 奖励积分
    /// </summary>
    public int? PointRewardCount { get; set; }

    /// <summary>
    /// 部门范围
    /// </summary> 
    public List<int> DeptIds { get; set; }

    /// <summary>
    /// 员工范围
    /// </summary> 
    public List<int> StaffIds { get; set; }

    /// <summary>
    /// 风格
    /// </summary>
    [Display(Name = "PaperStyle"), Description("风格"), MaxLength(32, ErrorMessage = "风格 不能超过 32 个字符")]
    public string PaperStyle { get; set; }

    /// <summary>
    /// 说明
    /// </summary>
    [Display(Name = "DescText"), Description("说明"), MaxLength(32, ErrorMessage = "说明 不能超过 32 个字符")]
    public string DescText { get; set; }

    /// <summary>
    /// 标题对齐方式
    /// </summary>
    [Display(Name = "TitleAlign"), Description("标题对齐方式"), MaxLength(32, ErrorMessage = "标题对齐方式 不能超过 32 个字符")]
    public string TitleAlign { get; set; }

    /// <summary>
    /// 说明对齐方式
    /// </summary>
    [Display(Name = "DescAlign"), Description("说明对齐方式"), MaxLength(32, ErrorMessage = "说明对齐方式 不能超过 32 个字符")]
    public string DescAlign { get; set; }

    /// <summary>
    /// 是否显示序号
    /// </summary>
    public bool? ShowSortNo { get; set; }

    /// <summary>
    /// 是否允许多次提交
    /// </summary>
    public bool? IsAllowMutiSubmit { get; set; }

    /// <summary>
    /// 开始结束时间
    /// </summary>
    public List<DateTime?> BeginEndTime { get; set; } = new List<DateTime?>();

    /// <summary>
    /// 备注
    /// </summary>
    [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
    public string RemarkSz { get; set; }
}

/// <summary>
/// 问卷调查题目
/// </summary>
public class Ghre_SurveyQuestionExtendBase
{
    public long Id { get; set; }

    /// <summary>
    /// 题目类型
    /// </summary>
    [Display(Name = "QuestionType"), Description("题目类型"), MaxLength(32, ErrorMessage = "题目类型 不能超过 32 个字符")]
    public string QuestionType { get; set; }

    /// <summary>
    /// 题目内容
    /// </summary>
    [Display(Name = "QuestionContent"), Description("题目内容"), MaxLength(2000, ErrorMessage = "题目内容 不能超过 2000 个字符")]
    public string QuestionContent { get; set; }

    /// <summary>
    /// 题目解析
    /// </summary>
    [Display(Name = "QuestionAnalysis"), Description("题目解析"), MaxLength(2000, ErrorMessage = "题目解析 不能超过 2000 个字符")]
    public string QuestionAnalysis { get; set; }

    /// <summary>
    /// 题目属性
    /// </summary>
    [Display(Name = "QuestionAttribute"), Description("题目属性"), MaxLength(32, ErrorMessage = "题目属性 不能超过 32 个字符")]
    public string QuestionAttribute { get; set; }

    /// <summary>
    /// 是否必填
    /// </summary>
    public bool? IsRequired { get; set; }

    /// <summary>
    /// 开始提示
    /// </summary>
    [Display(Name = "StartTips"), Description("开始提示"), MaxLength(64, ErrorMessage = "开始提示 不能超过 64 个字符")]
    public string StartTips { get; set; }

    /// <summary>
    /// 结束提示
    /// </summary>
    [Display(Name = "EndTips"), Description("结束提示"), MaxLength(64, ErrorMessage = "结束提示 不能超过 64 个字符")]
    public string EndTips { get; set; }

    /// <summary>
    /// 图标
    /// </summary>
    [Display(Name = "QuestionIcon"), Description("图标"), MaxLength(32, ErrorMessage = "图标 不能超过 32 个字符")]
    public string QuestionIcon { get; set; }

    /// <summary>
    /// 词云图关键字
    /// </summary>
    [Display(Name = "WordCloudKeywords"), Description("词云图关键字"), MaxLength(2000, ErrorMessage = "词云图关键字 不能超过 2000 个字符")]
    public string WordCloudKeywords { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
    public string RemarkSz { get; set; }

    /// <summary>
    /// 内置
    /// </summary>
    public int? BuiltIn { get; set; }
}

public class InsertGhre_SurveyExtend : Ghre_SurveyExtendBase
{

    /// <summary>
    /// 问卷调查题目
    /// </summary>
    public List<InsertGhre_SurveyQuestionExtend> Questions { get; set; }
}

/// <summary>
/// 问卷调查题目
/// </summary>
public class InsertGhre_SurveyQuestionExtend : Ghre_SurveyQuestionExtendBase
{
    /// <summary>
    /// 问卷调查选项
    /// </summary>
    public List<InsertGhre_SurveyOptionExtend> Options { get; set; } = new List<InsertGhre_SurveyOptionExtend>();
}

/// <summary>
/// 问卷调查选项
/// </summary>
public class InsertGhre_SurveyOptionExtend
{
    public long Id { get; set; }

    /// <summary>
    /// 选项编号
    /// </summary>
    [Display(Name = "OptionNo"), Description("选项编号"), MaxLength(32, ErrorMessage = "选项编号 不能超过 32 个字符")]
    public string OptionNo { get; set; }

    /// <summary>
    /// 选项内容
    /// </summary>
    [Display(Name = "OptionContent"), Description("选项内容"), MaxLength(2000, ErrorMessage = "选项内容 不能超过 2000 个字符")]
    public string OptionContent { get; set; }

    /// <summary>
    /// 是否必填
    /// </summary>
    public bool? IsRequired { get; set; }

    /// <summary>
    /// 分数
    /// </summary>
    [Display(Name = "Score"), Description("分数"), Column(TypeName = "decimal(20,2)")]
    public decimal? Score { get; set; }

    /// <summary>
    /// 是否其他选项
    /// </summary>
    public bool? IsOther { get; set; } = false;

    /// <summary>
    /// 其他选项内容
    /// </summary>
    [Display(Name = "OtherContent"), Description("其他选项内容"), MaxLength(128, ErrorMessage = "其他选项内容 不能超过 128 个字符")]
    public string OtherContent { get; set; }

    /// <summary>
    /// 图片地址
    /// </summary>
    [Display(Name = "ImageUrl"), Description("图片地址"), MaxLength(128, ErrorMessage = "图片地址 不能超过 128 个字符")]
    public string ImageUrl { get; set; }

    /// <summary>
    /// 图片宽度
    /// </summary>
    [Display(Name = "ImageWidthPc"), Description("图片宽度"), MaxLength(32, ErrorMessage = "图片宽度 不能超过 32 个字符")]
    public string ImageWidthPc { get; set; }

    /// <summary>
    /// 图片宽度
    /// </summary>
    [Display(Name = "ImageWidthApp"), Description("图片宽度"), MaxLength(32, ErrorMessage = "图片宽度 不能超过 32 个字符")]
    public string ImageWidthApp { get; set; }
}


public class Ghre_SurveyExtend : Ghre_SurveyExtendBase
{
    /// <summary>
    /// 问卷调查题目
    /// </summary>
    public List<Ghre_SurveyQuestionExtend> Questions { get; set; }

    public bool IsSubmit { get; set; } = false;
}

/// <summary>
/// 问卷调查题目
/// </summary>
public class Ghre_SurveyQuestionExtend : Ghre_SurveyQuestionExtendBase
{
    /// <summary>
    /// 问卷调查选项
    /// </summary>
    public List<Ghre_SurveyOptionExtend> Options { get; set; }

    /// <summary>
    /// 选项
    /// </summary>
    public string Value { get; set; }

    /// <summary>
    /// 选项列表
    /// </summary>
    public List<string> Value1 { get; set; }
}

/// <summary>
/// 问卷调查选项
/// </summary>
public class Ghre_SurveyOptionExtend : InsertGhre_SurveyOptionExtend
{
}

public class Ghre_SurveyStatistic
{
    /// <summary>
    /// 今日新增
    /// </summary>
    public int New { get; set; }

    /// <summary>
    /// 已填写
    /// </summary>
    public int Has { get; set; }

    /// <summary>
    /// 未填写
    /// </summary>
    public int All { get; set; }


    /// <summary>
    /// 问卷调查题目
    /// </summary>
    public List<Ghre_SurveyStatisticQuestion> Questions { get; set; }
}

/// <summary>
/// 问卷调查题目
/// </summary>
public class Ghre_SurveyStatisticQuestion : Ghre_SurveyQuestionExtendBase
{
    public List<Ghre_SurveyStatisticQuestionTable> Table { get; set; } = new List<Ghre_SurveyStatisticQuestionTable>();


}

public class Ghre_SurveyStatisticQuestionTable
{
    public long Id { get; set; }
    public string OptionNo { get; set; }
    public string OptionContent { get; set; }
    public decimal Count { get; set; }

    public string Percent { get; set; }
    public decimal? Percent1 { get; set; } = 0;

}

public class Ghre_OpenClassStatistic
{
    /// <summary>
    /// 课程得分
    /// </summary>
    public decimal? CourseScore { get; set; } = 0;

    /// <summary>
    /// 讲师得分
    /// </summary>
    public decimal? TeacherScore { get; set; } = 0;

    /// <summary>
    /// 反馈统计得发
    /// </summary>
    public int TotalScore { get; set; } = 0;

    public Ghre_OpenClassGroup CourseGroup { get; set; } = new Ghre_OpenClassGroup();
    public Ghre_OpenClassGroup TeacherGroup { get; set; } = new Ghre_OpenClassGroup();


    public Ghre_OpenClassTotalGroup TotalGroup { get; set; } = new Ghre_OpenClassTotalGroup();
    public List<Ghre_OpenClassStatisticRecord> Records { get; set; } = new List<Ghre_OpenClassStatisticRecord>();

}

public class Ghre_OpenClassStatisticRecord
{
    public long Id { get; set; }
    public string StaffNo { get; set; }
    public string StaffName { get; set; }
    public string DeptName { get; set; }
    public string CourseName { get; set; }
    public string ScoreStatus { get; set; }
    public decimal Score { get; set; }
    public string Source { get; set; }
}


public class Ghre_OpenClassGroup
{
    public List<Ghre_OpenClassQuestion> Trainee { get; set; } = new List<Ghre_OpenClassQuestion>();
    public List<Ghre_OpenClassQuestion> ParentTeacher { get; set; } = new List<Ghre_OpenClassQuestion>();
}

public class Ghre_OpenClassQuestion
{
    public long Id { get; set; }
    public string QuestionContent { get; set; }
    public string QuestionType { get; set; }
    public string FullName { get; set; }
    public decimal? Score { get; set; }
}

public class Ghre_OpenClassTotalGroup
{
    /// <summary>
    /// 今日新增
    /// </summary>
    public int New { get; set; }

    /// <summary>
    /// 已填写
    /// </summary>
    public int Has { get; set; }

    /// <summary>
    /// 未填写
    /// </summary>
    public int Not { get; set; }

    /// <summary>
    /// 全部
    /// </summary>
    public int All { get; set; }


    public Ghre_SurveyStatistic Trainee { get; set; }
    public Ghre_SurveyStatistic ParentTeacher { get; set; }
}