Explorar el Código

课程结构以及自定义名单

zhouj1203@hotmail.com hace 4 años
padre
commit
159b3e0252

+ 23 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/StuList.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace TEAMModelOS.SDK.Models.Cosmos.Common
+{
+    public class StuList : CosmosEntity
+    {
+        public List<Students> students { get; set; } = new List<Students>();
+        public List<string> tmids { get; set; }
+        public CourseInfo course { get; set; } = new CourseInfo();
+        public string name { get; set; }
+    }
+    public class Students { 
+        public string id { get; set; }
+        public string code { get; set; }
+    }
+    public class CourseInfo
+    {
+        public string id { get; set; }
+        public string code { get; set; }
+    }
+}

+ 29 - 7
TEAMModelOS.SDK/Models/Cosmos/School/Course.cs

@@ -14,9 +14,9 @@ namespace TEAMModelOS.SDK.Models
         public Course()
         {
             pk = "Course";
-            subject = new SubjectSimple();
-            period = new PeriodSimple();
-            teachers = new List<Teachers>();
+            //subject = new SubjectSimple();
+            //period = new PeriodSimple();
+            schedule = new List<Schedule>();
         }        
         /// <summary>
         /// 课程名称
@@ -35,18 +35,40 @@ namespace TEAMModelOS.SDK.Models
         /// <summary>
         /// 科目编码
         /// </summary>
-        public SubjectSimple subject { get; set; }
+        public string subjectId { get; set; }
         /// <summary>
         /// 学段编码
         /// </summary>
-        public PeriodSimple period { get; set; }
+        public string periodId { get; set; }
         /// <summary>
         /// 任课教师范围
         /// </summary>
-        public List<Teachers> teachers { get; set; }
+        //public List<Teachers> teachers { get; set; }
         public string scope { get; set; }
+        //public string notice { get; set; }
+        public List<Schedule> schedule { get; set; }
+        public List<Customize> classes { get; set; }
+
+    }
+
+    public class Schedule
+    {
+        public Info classInfo { get; set; } = new Info();
+        public Teachers teacher { get; set; } = new Teachers();
+        public string stulist { get; set; }
+        public string time { get; set; }
         public string notice { get; set; }
 
+    }
+
+    public class Customize
+    {
+        public string id { get; set; }
+        public string name { get; set; }
+        public Teachers teacher { get; set; } = new Teachers();
+        public string scope { get; set; }
+        public string code { get; set; }
+
     }
     public class PeriodSimple
     {
@@ -54,7 +76,7 @@ namespace TEAMModelOS.SDK.Models
         public string id { get; set; }
         public string name { get; set; }
     }
-    public class SubjectSimple
+    public class Info
     {
 
         public string id { get; set; }

+ 3 - 2
TEAMModelOS/Controllers/School/ClassRoomController.cs

@@ -390,7 +390,8 @@ namespace TEAMModelOS.Controllers
             try
             {
                 var client = _azureCosmos.GetCosmosClient();
-                List<object> classrooms = new List<object>();
+
+                /*List<object> classrooms = new List<object>();
                 StringBuilder sql = new StringBuilder();
                 Dictionary<string, object> dict = new Dictionary<string, object>();
                 var emobj = requert.EnumerateObject();
@@ -436,7 +437,7 @@ namespace TEAMModelOS.Controllers
                             }
                         }
                     }
-                }
+                }*/
                 return Ok(new { classrooms });
                 /*List<Classroom> sc = await _azureCosmos.FindByDict<Classroom>(request);
                 return builder.Data(sc).build();*/