You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
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. }