using System.Collections.Generic; namespace TEAMModelOS.SDK.Models { /// /// 統測活動主體 CosmosDB /// public class JointEvent : CosmosEntity { public string creatorId { get; set; } public string name { get; set; } public JointEventGeo geo { get; set; } = new JointEventGeo(); //可參加活動的國省市區限制 public List admin { get; set; } = new List(); //管理者 public List groups { get; set; } = new List(); //群組列表 public List schedule { get; set; } = new List(); //進程列表 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 assistants { get; set; } = new HashSet(); //評審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 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 loginType { get; set; } = new(); // 登入類型 } /// /// 統測活動老師報名課程 基底class /// 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 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 groupLists { get; set; } = new(); public string examId { get; set; } //對應生成的examId ※取得JointExam時用 } /// /// 統測活動學校報名班級 基底class /// 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 schedule { get; set; } = new(); public class JointEventGroupCourseGroupSchedule { public string id { get; set; } //進行狀況 undo:未開始、doing:進行中、complete:已完成、disqualify:無資格 public string status { get; set; } public List send { get; set; } = new(); public class JointEventGroupCourseGroupScheduleSend { //代號 [例]start:這個階段開始(例如熱身賽開始)、end public string code { get; set; } //已發送的通知 notify:端外通知 sms:簡訊通知 email:EMail public List type { get; set; } = new(); } } } } /// /// 統測活動老師報名課程 CosmosDB用 ※jointEventId、jointGroupId、creatorId 三個欄位合為主Key /// 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; } /// /// 統測活動學校報名班級 基底class /// 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 classLists { get; set; } = new(); public class JointEventClassSchoolClass { public string subjectId { get; set; } //為了生成評量,只好請班級多帶科目ID public string classId { get; set; } public string className { get; set; } } } /// /// 統測活動學校報名班級 CosmosDB [待做] /// 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; } /// /// 統測評量信息 CosmosDB /// 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 classes { get; set; } = new(); //[不使用] 評量班級從報名班級(DB)取得 public List stuLists { get; set; } = new(); //[不使用] 評量班級從老師報名課程(DB)取得 public List 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; } } }