OldStudent.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Text;
  6. using System.Text.Json.Serialization;
  7. using TEAMModelOS.SDK.Context.Attributes.Azure;
  8. using TEAMModelOS.SDK.DI;
  9. namespace TEAMModelOS.SDK.Models
  10. {
  11. public class OldStudent :CosmosEntity
  12. {
  13. public OldStudent()
  14. {
  15. password = new Password();
  16. productToken = new List<ProductToken>();
  17. oauth = new List<Oauth>();
  18. //classroom = new Classroom();
  19. }
  20. /// <summary>
  21. /// 0 动态id 透過第三方申請,未認證手機號,TEAMModelId暫時為virtualId但是不顯示在介面上,當使用者驗證手機號後TEAMModelId會變為手機號。
  22. /// 1 动态id 透過手機號申請,TEAMModelId為手機號
  23. /// 2 學生ID,透過學校建立,TEAMModelId格式為 {學校簡碼}#{學號}
  24. /// </summary>
  25. [Required(ErrorMessage = "{0} 必须填写")]
  26. public int type { get; set; }
  27. [Required(ErrorMessage = "{0} 必须填写")]
  28. public string name { get; set; }
  29. public string email { get; set; }
  30. public string cellphone { get; set; }
  31. public string countryCode { get; set; }
  32. public int verifyFlg { get; set; }
  33. public int status { get; set; } = 0;
  34. public long createDate { get; set; }
  35. public Password password { get; set; }
  36. public string exValue { get; set; }
  37. public string product { get; set; }
  38. public List<ProductToken> productToken { get; set; }
  39. public string shortCode { get; set; }
  40. public string profilePicture { get; set; }
  41. public string profilePictureUrl { get; set; }
  42. [JsonPropertyName("TEAMModelId")]
  43. [JsonProperty("TEAMModelId")]
  44. public string TEAMModelId { get; set; }
  45. public string loginTime { get; set; }
  46. public string virtualId { get; set; }
  47. public List<Oauth> oauth { get; set; } // 0 1
  48. public string haveDevice { get; set; }//2
  49. //public Classroom classroom { get; set; }
  50. public string classroomCode { get; set; }
  51. public string studentId { get; set; }
  52. public int seatNo { get; set; }
  53. }
  54. }
  55. public class Password {
  56. public string value { get; set; }
  57. public bool isSet { get; set; } = false;
  58. public bool isReset { get; set; } = false;
  59. }
  60. public class ProductToken
  61. {
  62. public string station { get; set; }
  63. public string url { get; set; }
  64. public string licenseStatus { get; set; }
  65. public string exp { get; set; }
  66. public string memberId { get; set; }
  67. }
  68. public class Oauth
  69. {
  70. public string provider { get; set; }
  71. public string openId { get; set; }
  72. }