using ProtoBuf;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using TEAMModelOS.Models.CommonInfo;
using TEAMModelOS.SDK.Context.Attributes.Azure;
using TEAMModelOS.SDK.DI;
namespace TEAMModelFunction
{
///
/// 问卷调查
///
[CosmosDB(Database = "TEAMModelOS",Name = "School")]
public class Survey : ID
{
public Survey() {
questions = new List();
classes = new List();
}
public string id { get; set; }
public int? ttl { get; set; }
public string pk { get; set; }
///
/// 学校编码 或者醍摩豆ID
///
[PartitionKey]
[Required(ErrorMessage = "{0} 必须填写")]
public string code { get; set; }
public string name { get; set; } //测试问卷名称', // 问卷名称
public string description { get; set; } //测试问卷描述', // 问卷描述
//public string type { get; set; } //normal', // 问卷类型
public string school { get; set; }
public string creatorId { get; set; }
public int year { get; set; }
public string progress { get; set; }
public List questions { get; set; }
public List targetClassIds { get; set; }
public int stuCount { get; set; }
public int status { get; set; } // 问卷状态(100:待发布 200:已发布 300:已结束)
///
/// 发布对象
///
//[ProtoMember(4)]
//public List target { get; set; }
///
/// 发布模式 0 立即发布 1 定时
///
[ProtoMember(5)]
public string publishModel { get; set; }
///
/// 开始时间
///
[ProtoMember(6)]
public long startTime { get; set; }
///
/// 结束时间
///
[ProtoMember(7)]
public long endTime { get; set; }
public long createTime { get; set; } // 问卷发布时间
public List classes { get; set; }
public long sequenceNumber { get; set; }
public string url { get; set; }
public string scope { get; set; }
}
/*public class Item {
public string stem { get; set; }
///
/// Complete Single Multiple Subjective, Judge判断
///
//public string type { get; set; }
public bool required { get; set; }
public int order { get; set; }
public string description { get; set; } = null;
public List options { get; set; }
public List result { get; set; }
}*/
public class Questions {
public string qid { get; set; }
public string question { get; set; }
public List option { get; set; }
public string type { get; set; }
public QuestionResult result { get; set; }
}
public class Options {
public string code { get; set; }
public string value { get; set; }
public Result result { 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; }
}
/*public class CodeVal{
public string code { get; set; }
public int value { get; set; }
}*/
}