您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

78 行
2.0KB

  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Reflection;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace HealthMonitor.Model.Cache
  9. {
  10. public class Person
  11. {
  12. [JsonProperty("personId")]
  13. public string PersonId { get; set; } = default!;
  14. [JsonProperty("deviceId")]
  15. public string DeviceId { get; set; } = default!;
  16. [JsonProperty("serialno")]
  17. public string SerialNo { get; set; } = default!;
  18. [JsonProperty("remarks")]
  19. public string Remarks { get; set; } = default!;
  20. [JsonProperty("ishypertension")]
  21. public bool Ishypertension { get; set; } = default!;
  22. [JsonProperty("personName")]
  23. public string PersonName { get; set; } = default!;
  24. [JsonProperty("gender")]
  25. public bool Gender { get; set; } = default!;
  26. // 用于存储真实值的字段
  27. // private bool gender;
  28. //public int Age
  29. //{
  30. // get
  31. // {
  32. // DateTime bornDate = DateTime.Parse(BornDate);
  33. // int age = DateTime.Today.Year - bornDate.Year;
  34. // if (bornDate > DateTime.Today.AddYears(-age)) age--;
  35. // return age;
  36. // }
  37. // set
  38. // {
  39. // BornDate = DateTime.Today.AddYears(-value).ToShortDateString();
  40. // }
  41. //}
  42. [JsonProperty("age")]
  43. public int Age { get; set; } = default!;
  44. [JsonProperty("bornDate")]
  45. public DateTime? BornDate { get; set; } = default!;
  46. [JsonProperty("height")]
  47. public int Height { get; set; } = default!;
  48. [JsonProperty("weight")]
  49. public int Weight { get; set; } = default!;
  50. }
  51. public class GpsDevicePerson
  52. {
  53. [JsonProperty("person")]
  54. public Person Person { get; set; } = default!;
  55. [JsonProperty("time")]
  56. public DateTime Time { get; set; } = default!;
  57. }
  58. }