Classroom.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Text;
  5. using System.Text.Json.Serialization;
  6. using TEAMModelOS.SDK.Context.Attributes.Azure;
  7. using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
  8. namespace TEAMModelOS.Service.Models.Core
  9. {
  10. [CosmosDB(RU = 400, Name = "CoreClassroom")]
  11. public class Classroom:ID
  12. {
  13. public int? ttl { get; set; } = -1;
  14. public Classroom()
  15. {
  16. point = new Point();
  17. }
  18. [Required(ErrorMessage = "{0} 必须填写")]
  19. [JsonPropertyName("id")]
  20. public string id { get; set; }
  21. [Required(ErrorMessage = "{0} 必须填写")]
  22. [PartitionKey]
  23. public string scopeCode { get; set; }
  24. [Required(ErrorMessage = "{0} 必须填写")]
  25. public string classroomCode { get; set; }
  26. public Point point { get; set; }
  27. public string classroomName { get; set; }
  28. public string headMaster { get; set; }
  29. public string periodCode { get; set; }
  30. public string gradeCode { get; set; }
  31. public string hiteach { get; set; }
  32. public int studentCount { get; set; }
  33. public string classroomType { get; set; }
  34. public int status { get; set; } = 1;
  35. //public string scope { get; set; }
  36. //public string TEAMModelId { get; set; }
  37. }
  38. }
  39. public class Point
  40. {
  41. public float x { get; set; }
  42. public float y { get; set; }
  43. }