Coupon.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. package com.kym.entity;
  2. import com.baomidou.mybatisplus.annotation.TableField;
  3. import com.baomidou.mybatisplus.annotation.TableName;
  4. import com.fasterxml.jackson.annotation.JsonFormat;
  5. import com.kym.entity.BaseEntity;
  6. import lombok.Getter;
  7. import lombok.Setter;
  8. import lombok.experimental.Accessors;
  9. import java.time.LocalDateTime;
  10. /**
  11. * <p>
  12. * 优惠券表
  13. * </p>
  14. *
  15. * @author skyline
  16. * @since 2024-04-25
  17. */
  18. @Getter
  19. @Setter
  20. @TableName("t_coupon")
  21. @Accessors(chain = true)
  22. public class Coupon extends BaseEntity {
  23. private static final long serialVersionUID = 1L;
  24. public static final String COUPON_TYPE_折扣券 = "Discount";
  25. public static final String COUPON_TYPE_满减券 = "FullDiscount";
  26. public static final String RECEIVE_TYPE_系统发放 = "Release";
  27. public static final String RECEIVE_TYPE_主动领取 = "Collect";
  28. public static final int STATUS_未开始 = 0;
  29. public static final int STATUS_进行中 = 1;
  30. public static final int STATUS_已结束 = 2;
  31. public static final int STATUS_已取消 = 3;
  32. /**
  33. * 活动id
  34. */
  35. private Long activityId;
  36. /**
  37. * 优惠券名称
  38. */
  39. private String name;
  40. /**
  41. * 优惠券描述
  42. */
  43. private String couponDesc;
  44. /**
  45. * 开始时间
  46. */
  47. @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  48. private LocalDateTime startTime;
  49. /**
  50. * 结束时间
  51. */
  52. @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  53. private LocalDateTime endTime;
  54. /**
  55. * 有效期(天)
  56. */
  57. private Integer validity;
  58. /**
  59. * 领取方式:Release-系统发放,Collect-主动领取
  60. */
  61. private String receiveType;
  62. /**
  63. * 券种:Discount折扣券、FullDiscount满减券
  64. */
  65. private String couponType;
  66. /**
  67. * 使用门槛:最小服务费金额(分)
  68. */
  69. private Integer minServiceMoney;
  70. /**
  71. * 折扣:100代表无折扣,75代表75折;折扣金额(分)
  72. */
  73. private Integer discount;
  74. /**
  75. * 优惠允许叠加:0-不允许,1-允许
  76. */
  77. private Integer allowStacke;
  78. /**
  79. * 数量限制
  80. */
  81. private Integer quantity;
  82. /**
  83. * 已领取/发放数量
  84. */
  85. private Integer claimedQuantity;
  86. /**
  87. * 已使用数量
  88. */
  89. private Integer usedQuantity;
  90. /**
  91. * 活动状态:0-未开始,1-进行中,2-已结束,3-已取消
  92. */
  93. private Integer status;
  94. /**
  95. * 备注
  96. */
  97. private String remark;
  98. /**
  99. * 是否已领取
  100. */
  101. @TableField(exist = false)
  102. private boolean collected ;
  103. }