WindowsCardsResponse.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. using Newtonsoft.Json;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace KdanCommon.CMSCollection.Data
  8. {
  9. public partial class WindowsCardsResponse
  10. {
  11. [JsonProperty("data")]
  12. public WindowsCardSetting[] Data { get; set; }
  13. }
  14. public partial class WindowsCardSetting : ISetting
  15. {
  16. public string SettingName
  17. {
  18. get
  19. {
  20. return Id;
  21. }
  22. }
  23. [JsonProperty("id")]
  24. public string Id { get; set; }
  25. [JsonProperty("status")]
  26. public string Status { get; set; }
  27. [JsonProperty("sort")]
  28. public object Sort { get; set; }
  29. [JsonProperty("user_created")]
  30. public string UserCreated { get; set; }
  31. [JsonProperty("date_created")]
  32. public DateTimeOffset DateCreated { get; set; }
  33. [JsonProperty("user_updated")]
  34. public string UserUpdated { get; set; }
  35. [JsonProperty("date_updated")]
  36. public DateTimeOffset DateUpdated { get; set; }
  37. [JsonProperty("Permission")]
  38. public string Permission { get; set; }
  39. [JsonProperty("Weight")]
  40. public long Weight { get; set; }
  41. [JsonProperty("appTypes")]
  42. public string[] AppTypes { get; set; }
  43. [JsonProperty("Start")]
  44. public DateTimeOffset Start { get; set; }
  45. [JsonProperty("End")]
  46. public DateTimeOffset End { get; set; }
  47. [JsonProperty("include_regions")]
  48. public bool IncludeRegions { get; set; }
  49. [JsonProperty("regions")]
  50. public string[] Regions { get; set; }
  51. [JsonProperty("Information")]
  52. public Information[] Information { get; set; }
  53. }
  54. public partial class Information
  55. {
  56. [JsonProperty("id")]
  57. public long Id { get; set; }
  58. [JsonProperty("windows_cards_id")]
  59. public string WindowsCardsId { get; set; }
  60. [JsonProperty("languages_code")]
  61. public string LanguagesCode { get; set; }
  62. [JsonProperty("Title")]
  63. public string Title { get; set; }
  64. [JsonProperty("Description")]
  65. public string Description { get; set; }
  66. [JsonProperty("Link")]
  67. public string Link { get; set; }
  68. [JsonProperty("Image")]
  69. public string Image { get; set; }
  70. public string ImageUrlStr
  71. {
  72. get
  73. {
  74. if (string.IsNullOrEmpty(Image))
  75. return null;
  76. return $"{CMSCollection.CMSDomain}/assets/{Image}";
  77. }
  78. }
  79. }
  80. }