123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- using System.Collections.Generic;
- namespace TEAMModelOS.SDK.Models
- {
- /// <summary>
- /// 統測活動主體 CosmosDB
- /// </summary>
- public class JointEvent : CosmosEntity
- {
- public string creatorId { get; set; }
- public string name { get; set; }
- public JointEventGeo geo { get; set; } = new JointEventGeo(); //可參加活動的國省市區限制
- public List<string> admin { get; set; } = new List<string>(); //管理者
- public List<JointEventGroup> groups { get; set; } = new List<JointEventGroup>(); //群組列表
- public List<JointEventSchedule> schedule { get; set; } = new List<JointEventSchedule>(); //進程列表
- public string examLinkType { get; set; } = "no"; //評量連動類型 "no":未參加熱身賽也可以參加決賽 ※預設值 "one":熱身賽完成任一場就可以參加決賽 "all":熱身賽全完成才可以參加決賽
- public long createTime { get; set; }
- public long startTime { get; set; }
- public long endTime { get; set; }
- public string progress { get; set; } //進程 "pending" "going" "finish"
- public class JointEventGroup //活動群組
- {
- public string id { get; set; } //活動群組ID
- public string name { get; set; } //群組名稱
- public HashSet<string> assistants { get; set; } = new HashSet<string>(); //評審TMID列表
- }
- public class JointEventGeo //活動區域(國省市區)
- {
- public string countryId { get; set; } //國
- public string provinceId { get; set; } //省
- public string cityId { get; set; } //市
- public string distId { get; set; } //區
- }
- public class JointEventSchedule //活動進程
- {
- public string id { get; set; } //活動進程ID
- public string name { get; set; } //進程名稱
- public string type { get; set; } //"exam":評量 "join":報名 "other":其他
- public string examType { get; set; } //評量類型 "regular":一般競賽 "custom":決賽
- public bool examOverwrite { get; set; } //評量可否重複作答 true:可 false:不可
- public List<JointEventScheduleBlob> blobs { get; set; } = null; //說明文件存放Blob
- public string location { get; set; } //地點
- public string description { get; set; } //說明
- public long startTime { get; set; }
- public long endTime { get; set; }
- public string progress { get; set; } //進行狀況 "pending" "going" "finish"
- public int orderby { get; set; } //排序
- }
- public class JointEventScheduleBlob
- {
- public string name { get; set; } //檔案名稱
- public string blob { get; set; } //檔案Blob路徑
- }
- public List<string> loginType { get; set; } = new(); // 登入類型
- }
- /// <summary>
- /// 統測活動老師報名課程 基底class
- /// </summary>
- public class JointEventGroupBase
- {
- public string scope { get; set; } //school:學校(選課班) private:個人
- public string type { get; set; } //類型 "regular":報名名單 "custom":決賽用名單
- public string creatorId { get; set; }
- public string creatorName { get; set; }
- public string creatorEmail { get; set; }
- public string schoolId { get; set; } //老師教育雲綁定的學校ID
- public string schoolName { get; set; } //老師教育雲綁定的學校名稱
- public string periodId { get; set; } //老師個人課程時為null
- public string countryId { get; set; }
- public string countryName { get; set; }
- public string provinceId { get; set; }
- public string provinceName { get; set; }
- public string cityId { get; set; }
- public string cityName { get; set; }
- public List<JointEventGroupCourse> courseLists { get; set; } = new();
- public class JointEventGroupCourse
- {
- public string subjectId { get; set; } //老師個人課程時為null
- public string courseId { get; set; }
- public string courseName { get; set; }
- public List<JointEventGroupCourseGroup> groupLists { get; set; } = new();
- public string examId { get; set; } //對應生成的examId ※取得JointExam時用
- }
- /// <summary>
- /// 統測活動學校報名班級 基底class
- /// </summary>
- public class JointEventClassBase
- {
- }
- public class JointEventGroupCourseGroup
- {
- public string id { get; set; }
- public string name { get; set; }
- public string no { get; set; } //系統安排的流水號 ※各組(jointGroup)的班級從1開始++ 決賽才記入
- public int expStuNum { get; set; } //預估學生人數
- public List<JointEventGroupCourseGroupSchedule> schedule { get; set; } = new();
- public class JointEventGroupCourseGroupSchedule
- {
- public string id { get; set; }
- //進行狀況 undo:未開始、doing:進行中、complete:已完成、disqualify:無資格
- public string status { get; set; }
- public List<JointEventGroupCourseGroupScheduleSend> send { get; set; } = new();
- public class JointEventGroupCourseGroupScheduleSend
- {
- //代號 [例]start:這個階段開始(例如熱身賽開始)、end
- public string code { get; set; }
- //已發送的通知 notify:端外通知 sms:簡訊通知 email:EMail
- public List<string> type { get; set; } = new();
- }
- }
- }
- }
- /// <summary>
- /// 統測活動老師報名課程 CosmosDB用 ※jointEventId、jointGroupId、creatorId 三個欄位合為主Key
- /// </summary>
- public class JointEventGroupDb : JointEventGroupBase
- {
- public string jointEventId { get; set; }
- public string jointGroupId { get; set; }
- public string jointScheduleId { get; set; } //活動進程ID 決賽用名單才有值,其餘為null
- public string id { get; set; }
- public string code { get; set; }
- public string pk { get; set; }
- public long createTime { get; set; }
- public int? ttl { get; set; } = -1;
- public long? _ts { get; set; } = -1;
- }
-
- /// <summary>
- /// 統測活動學校報名班級 基底class
- /// </summary>
- public class JointEventClassBase
- {
- public string type { get; set; } //類型 "regular":報名名單 "custom":決賽用名單
- public string schoolId { get; set; }
- public string schoolName { get; set; }
- public string jointScheduleId { get; set; } //活動進程ID 決賽用名單才有值,其餘為null
- public List<JointEventClassSchoolClass> classLists { get; set; } = new();
- public class JointEventClassSchoolClass
- {
- public string subjectId { get; set; } //為了生成評量,只好請班級多帶科目ID
- public string classId { get; set; }
- public string className { get; set; }
- }
- }
- /// <summary>
- /// 統測活動學校報名班級 CosmosDB [待做]
- /// </summary>
- public class JointEventClassDb : JointEventClassBase
- {
- public string jointEventId { get; set; }
- public string jointGroupId { get; set; }
- public string id { get; set; }
- public string code { get; set; }
- public string pk { get; set; }
- public int? ttl { get; set; } = -1;
- public long? _ts { get; set; } = -1;
- }
- /// <summary>
- /// 統測評量信息 CosmosDB
- /// </summary>
- public class JointExam : CosmosEntity
- {
- public string jointEventId { get; set; }
- public string jointScheduleId { get; set; }
- public string jointGroupId { get; set; }
- public string creatorId { get; set; }
- public string name { get; set; }
- public string examType { get; set; } //評量類型 "regular":一般競賽 "custom":決賽
- public bool examOverwrite { get; set; } //評量可否重複作答 true:可 false:不可
- public List<JointEventClassBase> classes { get; set; } = new(); //[不使用] 評量班級從報名班級(DB)取得
- public List<JointEventGroupBase> stuLists { get; set; } = new(); //[不使用] 評量班級從老師報名課程(DB)取得
- public List<PaperSimple> papers { get; set; } = new();
- public string progress { get; set; } //進行狀況 "pending" "going" "finish"
- public long createTime { get; set; }
- public long updateTime { get; set; }
- public long startTime { get; set; }
- public long endTime { get; set; }
- public string source { get; set; } //评测类型 0:'線上自主評量', 1:'智慧教室評量', 2:'卷卡合一評量'
- public string scope { get; set; }
- }
- }
|