Browse Source

統測活動老師報名資訊 追加創建時間欄位

jeff 9 months ago
parent
commit
679c0ac674

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Teacher/JointEvent.cs

@@ -98,6 +98,7 @@ namespace TEAMModelOS.SDK.Models
         public string id { get; set; }
         public string id { get; set; }
         public string code { get; set; }
         public string code { get; set; }
         public string pk { get; set; }
         public string pk { get; set; }
+        public long createTime { get; set; }
         public int? ttl { get; set; } = -1;
         public int? ttl { get; set; } = -1;
         public long? _ts { get; set; } = -1;
         public long? _ts { get; set; } = -1;
     }
     }

+ 2 - 0
TEAMModelOS.SDK/Models/Service/JointService.cs

@@ -17,6 +17,7 @@ using static TEAMModelOS.SDK.Models.JointEventGroupBase;
 using Azure.Core;
 using Azure.Core;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.Configuration;
 using static TEAMModelOS.SDK.Models.JointEvent;
 using static TEAMModelOS.SDK.Models.JointEvent;
+using TEAMModelOS.SDK.Models.Dtos;
 
 
 namespace TEAMModelOS.SDK.Models.Service
 namespace TEAMModelOS.SDK.Models.Service
 {
 {
@@ -443,6 +444,7 @@ namespace TEAMModelOS.SDK.Models.Service
                                         new() { id = group.id, name = group.name }
                                         new() { id = group.id, name = group.name }
                                     }
                                     }
                                 });
                                 });
+                                finalEventCourse.createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
                                 jointCourseCreates.Add(finalEventCourse);
                                 jointCourseCreates.Add(finalEventCourse);
                             }
                             }
                             else
                             else

+ 1 - 1
TEAMModelOS/Controllers/Teacher/JointEventController.cs

@@ -646,7 +646,7 @@ namespace TEAMModelOS.Controllers.Common
                         jointCourse.creatorEmail = creatorEmail;
                         jointCourse.creatorEmail = creatorEmail;
                         jointCourse.schoolId = schoolId;
                         jointCourse.schoolId = schoolId;
                         jointCourse.schoolName = schoolName;
                         jointCourse.schoolName = schoolName;
-
+                        jointCourse.createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
                     }
                     }
                     //修改
                     //修改
                     jointCourse.courseLists = courseLists;
                     jointCourse.courseLists = courseLists;