Przeglądaj źródła

用JsonProperty统一醍摩豆id保持大写 TEAMModelId

李思淳 5 lat temu
rodzic
commit
4d09ec3999

+ 4 - 0
TEAMModelOS.Service/Models/Core/LoginInfo.cs

@@ -1,4 +1,6 @@
 using Microsoft.Azure.Cosmos.Table;
+using Newtonsoft.Json;
+using System.Text.Json.Serialization;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 
 namespace TEAMModelOS.Service.Models.Core
@@ -9,6 +11,8 @@ namespace TEAMModelOS.Service.Models.Core
     [TableSpace(Name = "Core")]
     public class LoginInfo : TableEntity
     {
+        [JsonPropertyName("TEAMModelId")]
+        [JsonProperty("TEAMModelId")]
         public string TeamModelId { get; set; }
         public string Phone { get; set; }
         public string Ticket { get; set; }

+ 3 - 0
TEAMModelOS.Service/Models/Core/Student.cs

@@ -3,6 +3,7 @@ using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Text;
+using System.Text.Json.Serialization;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 
 namespace TEAMModelOS.Service.Models.Core
@@ -46,6 +47,8 @@ namespace TEAMModelOS.Service.Models.Core
         public string shortCode { get; set; }
         public string profilePicture { get; set; }
         public string profilePictureUrl { get; set; }
+        [JsonPropertyName("TEAMModelId")]
+        [JsonProperty("TEAMModelId")]
         public string TEAMModelId { get; set; }
         public string loginTime { get; set; }
         public string virtualId { get; set; }

+ 5 - 1
TEAMModelOS.Service/Models/Core/Teacher.cs

@@ -1,7 +1,9 @@
-using System;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Text;
+using System.Text.Json.Serialization;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 
 namespace TEAMModelOS.Service.Models.Core
@@ -32,6 +34,8 @@ namespace TEAMModelOS.Service.Models.Core
         public string shortCode { get; set; }
         public string profilePicture { get; set; }
         public string profilePictureUrl { get; set; }
+        [JsonPropertyName("TEAMModelId")]
+        [JsonProperty("TEAMModelId")]
         public string TEAMModelId { get; set; }
         public string loginTime { get; set; }
         public string virtualId { get; set; }

+ 5 - 1
TEAMModelOS.Service/Models/Syllabus/Knowledge.cs

@@ -1,7 +1,9 @@
-using System;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Text;
+using System.Text.Json.Serialization;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 
 namespace TEAMModelOS.Service.Models.Syllabus
@@ -85,6 +87,8 @@ namespace TEAMModelOS.Service.Models.Syllabus
         ///  醍摩豆id
         /// </summary>
         [Required(ErrorMessage = "{0} 必须填写")]
+        [JsonPropertyName("TEAMModelId")]
+        [JsonProperty("TEAMModelId")]
         public string TEAMModelId { get; set; }
     }
 }

+ 5 - 1
TEAMModelOS.Service/Models/Syllabus/SyllabusResource.cs

@@ -1,7 +1,9 @@
-using System;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Text;
+using System.Text.Json.Serialization;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 
 namespace TEAMModelOS.Service.Models.Syllabus
@@ -16,6 +18,8 @@ namespace TEAMModelOS.Service.Models.Syllabus
         /// 上传者醍摩豆id
         /// </summary>
         [Required(ErrorMessage = "{0} 必须填写")]
+        [JsonPropertyName("TEAMModelId")]
+        [JsonProperty("TEAMModelId")]
         public string TEAMModelId { get; set; }
 
         /// <summary>