using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using TEAMModelOS.SDK.Context.Attributes.Azure;
namespace TEAMModelOS.SDK.Models
{
///
/// 问卷调查
///
public class Survey : CosmosEntity
{
public Survey() {
pk = "Survey";
// questions = new List();
classes = new List();
tmdids = new List();
}
///
/// 学校编码或教室tmdid
///
[Required(ErrorMessage = "owner 必须设置")]
public string owner { get; set; }
///
/// 问卷名称
///
[Required(ErrorMessage = "name 必须设置")]
public string name { get; set; }
///
/// 问卷描述
///
public string description { get; set; }
//public string type { get; set; } //normal', // 问卷类型
///
/// 创建者的id
///
[Required(ErrorMessage = "creatorId 必须设置")]
public string creatorId { get; set; }
// public int year { get; set; }
///
/// pending 待发布|going 已发布|finish 已结束
///
[Required(ErrorMessage = "progress 必须设置")]
public string progress { get; set; }
public string scope { get; set; }
public List tmdids { get; set; }
public List classes { get; set; }
// public List targetClassIds { get; set; }
// public int stuCount { get; set; }
///
/// 问卷状态(100:待发布 200:已发布 300:已结束)
///
public int status { get; set; }
///
/// 发布对象
///
//[ProtoMember(4)]
//public List target { get; set; }
///
/// 发布模式 0 立即发布 1 定时
///
//public string publishModel { get; set; }
///
/// 开始时间
///
public long startTime { get; set; }
///
/// 结束时间
///
public long endTime { get; set; }
public long createTime { get; set; } // 问卷发布时间
///
/// 更新时间
///
public long updateTime { get; set; }
//public long sequenceNumber { get; set; }
public string blobUrl { get; set; }
//将问题放入Blob
//public List questions { get; set; }
}
///
///
///
public class Question {
public string qid { get; set; }
public string question { get; set; }
public List options { get; set; }
public string type { get; set; }
//public QuestionResult result { get; set; }
}
public class OptionSurvey{
///
/// 选项编码
///
public string code { get; set; }
///
/// 选项文本
///
public string value { get; set; }
///
/// 选项描述
///
//public string desc { get; set; }
///
/// 选择数
///
public int? count { get; set; }
///
/// 其他答案数量
///
public int? other { get; set; }
}
public class QuestionResult
{
public double finish { get; set; }
public double finishRate { get; set; }
}
public class Result {
public double count { get; set; }
public double rate { get; set; }
}
public class Classes {
public string code { get; set; }
public string id { get; set; }
public string name { get; set; }
public string scope { get; set; }
public Result result { get; set; }
public List students { get; set; }
public List answers { get; set; }
}
public class AnswerRate {
public string qid { get; set; }
public double answerRate { get; set; }
public List option { get; set; }
}
public class StudentInfo {
public string id { get; set; }
public string name { get; set; }
public long finishTime { get; set; }
public List answers { get; set; }
public ResultInfo result { get; set; }
}
public class ResultInfo
{
public double answerRate { get; set; }
}
public class AnswerInfo {
public string qid { get; set; }
public string answer { get; set; }
}
}