OldStudent.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. public string periodId { get; set; }
  54. }
  55. }
  56. public class Password {
  57. public string value { get; set; }
  58. public bool isSet { get; set; } = false;
  59. public bool isReset { get; set; } = false;
  60. }
  61. public class ProductToken
  62. {
  63. public string station { get; set; }
  64. public string url { get; set; }
  65. public string licenseStatus { get; set; }
  66. public string exp { get; set; }
  67. public string memberId { get; set; }
  68. }
  69. public class Oauth
  70. {
  71. public string provider { get; set; }
  72. public string openId { get; set; }
  73. }