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();
}
///
///发布层级 类型 school teacher
///
public string owner { get; set; }
///
/// 学校编码或教室tmdid
///
[Required(ErrorMessage = "owner 必须设置")]
public string school { 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 long startTime { get; set; }
///
/// 结束时间
///
public long endTime { get; set; }
public long createTime { get; set; } // 问卷发布时间
///
/// 更新时间
///
public long updateTime { get; set; }
//将问题放入Blob hbcn/survey/问卷调查id.json 存放内容 Question的数组
public string blob { get; set; }
// public List questions { get; set; }
///
/// 学生作答记录/ 状态为finish时进行结算
///
public string recordUrl { get; set; }
///
/// 如果本题不是客观题 则为[]空数组
/// 客观题所有选项[["A","B","C","D"],["A","B"],[],["A","B"]]
///
public List> answers { get; set; }
///
/// TTL删除改变状态使用
///
public int? status { get; set; } = 0;
}
///
///问卷题目
///
//public class Question {
// ///
// /// 题目id
// ///
// public string qid { get; set; }
// ///
// /// 问卷题目
// ///
// public string question { get; set; }
// ///
// /// 问卷题目的描述
// ///
// public string description { get; set; }
// ///
// /// 问卷选项
// ///
// public List options { get; set; }
// ///
// /// 判断judge 多选multiple 单选single
// ///
// public string type { get; set; }
// ///
// /// 是否必需作答
// ///
// public bool required { get; set; }
//}
}