Class.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 TEAMModelOS.SDK.Models
  11. {
  12. [CosmosDB(Database = "TEAMModelOS", Name = "School")]
  13. public class Class : CosmosEntity
  14. {
  15. public Class()
  16. {
  17. pk = "Class";
  18. teacher = new Teachers();
  19. students = new List<StudentSimple>();
  20. }
  21. /// <summary>
  22. /// 教室编号
  23. /// </summary>
  24. public string no { get; set; }
  25. public float x { get; set; }
  26. public float y { get; set; }
  27. public string name { get; set; }
  28. public Teachers teacher { get; set; }
  29. public string periodId { get; set; }
  30. public string gradeId { get; set; }
  31. public string sn { get; set; }
  32. public List<StudentSimple> students { get; set; }
  33. /// <summary>
  34. /// TBL IRS 类型区分
  35. /// </summary>
  36. public string style { get; set; }
  37. public int status { get; set; } = 1;
  38. /// <summary>
  39. /// 教室属性,普通 /专设的教室
  40. /// </summary>
  41. public string openType { get; set; }
  42. public string scope { get; set; }
  43. }
  44. }
  45. public class Point
  46. {
  47. public float x { get; set; }
  48. public float y { 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. }