Classroom.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using Azure.Cosmos;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Text;
  6. using System.Text.Json;
  7. using System.Text.Json.Serialization;
  8. using TEAMModelOS.SDK.Context.Attributes.Azure;
  9. using TEAMModelOS.SDK.DI;
  10. namespace TEAMModelFunction
  11. {
  12. public class Classroom:ID
  13. {
  14. public string pk { get; set; }
  15. public int? ttl { get; set; }
  16. public Classroom()
  17. {
  18. students = new List<StudentSimple>();
  19. teacher = new Teachers();
  20. }
  21. [JsonPropertyName("id")]
  22. public string id { get; set; }
  23. public float x { get; set; }
  24. public float y { get; set; }
  25. public string name { get; set; }
  26. public Teachers teacher { get; set; }
  27. public string periodId { get; set; }
  28. public string gradeId { get; set; }
  29. public string sn { get; set; }
  30. public int studentCount { get; set; }
  31. public List<StudentSimple> students { get; set; }
  32. /// <summary>
  33. /// TBL IRS 类型区分
  34. /// </summary>
  35. public string style { get; set; }
  36. public int status { get; set; } = 1;
  37. /// <summary>
  38. /// </summary>
  39. /*[ProtoMember(13)]
  40. [Required(ErrorMessage = "{0} 必须填写,请设置个人教室还是学校教室")]
  41. public int type { get; set; } = 1;*/
  42. [PartitionKey]
  43. public string code { get; set; }
  44. /// <summary>
  45. /// 教室属性,普通 /专设的教室
  46. /// </summary>
  47. public string openType { get; set; }
  48. public string scope { get; set; }
  49. }
  50. public class StudentSimple
  51. {
  52. public string id { get; set; }
  53. public string name { get; set; }
  54. public string no { get; set; }
  55. public string groupId { get; set; }
  56. public string groupName { get; set; }
  57. }
  58. public class Teachers
  59. {
  60. public string id { get; set; }
  61. public string name { get; set; }
  62. }
  63. }