SvrViewModel.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using DW5S.DTO;
  8. namespace DW5S.ViewModel
  9. {
  10. /// <summary>
  11. /// 服务状态信息
  12. /// </summary>
  13. public class SvrViewModel
  14. {
  15. public SvrViewModel(EnumSvrType svr, string v1, string v2, string v3, DateTimeOffset now)
  16. {
  17. this.SvrType = svr;
  18. this.SvrID = v1;
  19. this.BaseHttpAddr = v2;
  20. this.SwaggerAddr = v3;
  21. this.ReportTime = now;
  22. }
  23. /// <summary>
  24. /// 服务类型
  25. /// </summary>
  26. [Display(Name = "服务类型")]
  27. public EnumSvrType SvrType { get; set; }
  28. /// <summary>
  29. /// 服务ID
  30. /// </summary>
  31. [Display(Name = "服务ID")]
  32. public string SvrID { get; set; }
  33. /// <summary>
  34. /// 服务Http基地址
  35. /// </summary>
  36. [Display(Name = "服务Http地址",AutoGenerateField =false)]
  37. public string BaseHttpAddr { get; set; }
  38. /// <summary>
  39. ///接口地址
  40. /// </summary>
  41. [Display(Name = "接口地址")]
  42. public string SwaggerAddr { get; set; }
  43. /// <summary>
  44. /// 状态上报时间
  45. /// </summary>
  46. [Display(Name = "状态上报时间")]
  47. public DateTimeOffset ReportTime { get; set; }
  48. }
  49. }