zhouj1203@hotmail.com 4 vuotta sitten
vanhempi
commit
ac79dd44e7

+ 3 - 3
TEAMModelFunction/ActivityHttpTrigger.cs

@@ -70,7 +70,7 @@ namespace TEAMModelFunction
                         dataa = new ActivityData
                         {
                             id = info.id,
-                            code = $"Activity-{info.owner}",
+                            code = $"Activity-{info.school}",
                             type = "exam",
                             name = info.name,
                             startTime = info.startTime,
@@ -80,7 +80,7 @@ namespace TEAMModelFunction
                             classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
                             tmdids = new List<string> { "" },
                             progress = "going",
-                            owner = info.owner,
+                            owner = info.school,
                             subjects = sub
                         };
                         await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ActivityData>(dataa, new Azure.Cosmos.PartitionKey(dataa.code));
@@ -100,7 +100,7 @@ namespace TEAMModelFunction
                             progress = "going",
                             classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
                             tmdids = new List<string> { "" },
-                            owner = info.owner,
+                            owner = info.creatorId,
                             subjects = sub
                         };
                         await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync<ActivityData>(dataa, new Azure.Cosmos.PartitionKey(dataa.code));

+ 6 - 6
TEAMModelFunction/TriggerExam.cs

@@ -94,7 +94,7 @@ namespace TEAMModelFunction
                         data = new ActivityData
                         {
                             id = info.id,
-                            code = $"Activity-{info.owner}",
+                            code = $"Activity-{info.school}",
                             type = "exam",
                             name = info.name,
                             startTime = info.startTime,
@@ -104,7 +104,7 @@ namespace TEAMModelFunction
                             classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
                             tmdids =  new List<string> { "" },
                             progress = "going",
-                            owner = info.owner,
+                            owner = info.school,
                             subjects = sub
                         };
                         await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
@@ -124,7 +124,7 @@ namespace TEAMModelFunction
                             progress = "going",
                             classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
                             tmdids = new List<string> { "" },
-                            owner = info.owner,
+                            owner = info.creatorId,
                             subjects = sub
                         };
                         await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync<ActivityData>(data, new Azure.Cosmos.PartitionKey(data.code));
@@ -290,7 +290,7 @@ namespace TEAMModelFunction
                         data = new ActivityData
                         {
                             id = info.id,
-                            code = $"Activity-{info.owner}",
+                            code = $"Activity-{info.school}",
                             type = "exam",
                             name = info.name,
                             startTime = info.startTime,
@@ -300,7 +300,7 @@ namespace TEAMModelFunction
                             progress = "finish",
                             classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
                             tmdids = new List<string> { "" },
-                            owner = info.owner,
+                            owner = info.school,
                             subjects = sub
                         };
                         await client.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<ActivityData>(data, info.id, new Azure.Cosmos.PartitionKey(data.code));
@@ -320,7 +320,7 @@ namespace TEAMModelFunction
                             progress = "finish",
                             classes = info.targetClassIds.IsNotEmpty() ? info.targetClassIds : new List<string> { "" },
                             tmdids = new List<string> { "" },
-                            owner = info.owner,
+                            owner = info.creatorId,
                             subjects = sub
                         };
                         await client.GetContainer("TEAMModelOS", "Teacher").ReplaceItemAsync<ActivityData>(data, info.id, new Azure.Cosmos.PartitionKey(data.code));

+ 1 - 1
TEAMModelOS.SDK/Models/Cosmos/School/ExamInfo.cs

@@ -25,7 +25,7 @@ namespace TEAMModelOS.SDK.Models
         /// <summary>
         /// 学校编码或教室tmdid
         /// </summary>
-        public string owner { get; set; }
+        public string blob { get; set; }
         public string name { get; set; }
         public string school { get; set; }
         public string creatorId { get; set; }