CouponCenterDTO.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. using dodohold.core;
  2. namespace molilian.core
  3. {
  4. [Table("coupon_center_platforms")]
  5. public class CouponCenterPlatformEntityDTO
  6. {
  7. [Key]
  8. public string id { get; set; } = string.Empty;
  9. public string name { get; set; } = string.Empty;
  10. public string icon_url { get; set; } = string.Empty;
  11. public int sort { get; set; } = 0;
  12. public bool status { get; set; } = true;
  13. public DateTime create_time { get; set; } = DateTime.Now;
  14. public DateTime update_time { get; set; } = DateTime.Now;
  15. }
  16. [Table("coupon_center_activities")]
  17. public class CouponCenterActivityEntityDTO
  18. {
  19. [Key]
  20. public string id { get; set; } = string.Empty;
  21. public string platform_id { get; set; } = string.Empty;
  22. public string name { get; set; } = string.Empty;
  23. public string short_desc { get; set; } = string.Empty;
  24. public string deeplink { get; set; } = string.Empty;
  25. public int sort { get; set; } = 0;
  26. public bool status { get; set; } = true;
  27. public DateTime create_time { get; set; } = DateTime.Now;
  28. public DateTime update_time { get; set; } = DateTime.Now;
  29. }
  30. [Table("coupon_center_coupons")]
  31. public class CouponCenterCouponEntityDTO
  32. {
  33. [Key]
  34. public string id { get; set; } = string.Empty;
  35. public string activity_id { get; set; } = string.Empty;
  36. public string value { get; set; } = string.Empty;
  37. public string expire_time { get; set; } = string.Empty;
  38. public string category { get; set; } = string.Empty;
  39. public string threshold { get; set; } = string.Empty;
  40. public string coupon_status { get; set; } = string.Empty;
  41. public int sort { get; set; } = 0;
  42. public bool status { get; set; } = true;
  43. public DateTime create_time { get; set; } = DateTime.Now;
  44. public DateTime update_time { get; set; } = DateTime.Now;
  45. }
  46. public class CouponCenterPlatformDTO
  47. {
  48. public string id { get; set; } = string.Empty;
  49. public string name { get; set; } = string.Empty;
  50. public string iconUrl { get; set; } = string.Empty;
  51. }
  52. public class CouponCenterCouponDTO
  53. {
  54. public string id { get; set; } = string.Empty;
  55. public string value { get; set; } = string.Empty;
  56. public string expireTime { get; set; } = string.Empty;
  57. public string category { get; set; } = string.Empty;
  58. public string threshold { get; set; } = string.Empty;
  59. public string status { get; set; } = string.Empty;
  60. }
  61. public class CouponCenterActivityDTO
  62. {
  63. public string id { get; set; } = string.Empty;
  64. public string platformId { get; set; } = string.Empty;
  65. public string name { get; set; } = string.Empty;
  66. public string shortDesc { get; set; } = string.Empty;
  67. public string deeplink { get; set; } = string.Empty;
  68. public List<CouponCenterCouponDTO> coupons { get; set; } = [];
  69. }
  70. public class CouponCenterPaginationDTO
  71. {
  72. public bool hasMore { get; set; } = false;
  73. public string? nextCursor { get; set; }
  74. }
  75. public class CouponCenterActivitiesResponseDTO
  76. {
  77. public string version { get; set; } = string.Empty;
  78. public List<CouponCenterPlatformDTO> platforms { get; set; } = [];
  79. public List<CouponCenterActivityDTO> activities { get; set; } = [];
  80. public CouponCenterPaginationDTO pagination { get; set; } = new();
  81. }
  82. }