PromotionCouponRule.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. package com.ruoyi.system.domain;
  2. import java.math.BigDecimal;
  3. import java.util.Date;
  4. import com.baomidou.mybatisplus.annotation.TableField;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import com.fasterxml.jackson.annotation.JsonFormat;
  7. import com.baomidou.mybatisplus.annotation.IdType;
  8. import com.baomidou.mybatisplus.annotation.TableId;
  9. import org.apache.commons.lang3.builder.ToStringBuilder;
  10. import org.apache.commons.lang3.builder.ToStringStyle;
  11. import lombok.Data;
  12. import lombok.EqualsAndHashCode;
  13. import javax.persistence.GeneratedValue;
  14. /**
  15. * PromotionCouponRule对象 promotion_coupon_rule
  16. *
  17. * @author ruoyi
  18. * @date 2024-05-30
  19. */
  20. @Data
  21. @TableName(value = "promotion_coupon_rule")
  22. @EqualsAndHashCode(callSuper = false)
  23. public class PromotionCouponRule
  24. {
  25. private static final long serialVersionUID = 1L;
  26. @TableId(type = IdType.AUTO)
  27. @GeneratedValue
  28. /** id */
  29. private Long id;
  30. /** 批次ID */
  31. private Long batchId;
  32. /** 商品ID */
  33. private Long productId;
  34. /** 0=同享 1=互斥 */
  35. private Integer isMutex;
  36. /** 门槛金额 */
  37. private BigDecimal threshold;
  38. /** 券面额 */
  39. private BigDecimal amount;
  40. /** 折扣率 */
  41. private BigDecimal discountRate;
  42. /** 商品名称 */
  43. @TableField(exist = false)
  44. private String productName;
  45. /** 商品图片 */
  46. @TableField(exist = false)
  47. private String productImage;
  48. /** 商品价格 */
  49. @TableField(exist = false)
  50. private BigDecimal productPrice;
  51. public void setId(Long id)
  52. {
  53. this.id = id;
  54. }
  55. public Long getId()
  56. {
  57. return id;
  58. }
  59. public void setBatchId(Long batchId)
  60. {
  61. this.batchId = batchId;
  62. }
  63. public Long getBatchId()
  64. {
  65. return batchId;
  66. }
  67. public void setProductId(Long productId)
  68. {
  69. this.productId = productId;
  70. }
  71. public Long getProductId()
  72. {
  73. return productId;
  74. }
  75. public void setIsMutex(Integer isMutex)
  76. {
  77. this.isMutex = isMutex;
  78. }
  79. public Integer getIsMutex()
  80. {
  81. return isMutex;
  82. }
  83. public void setThreshold(BigDecimal threshold)
  84. {
  85. this.threshold = threshold;
  86. }
  87. public BigDecimal getThreshold()
  88. {
  89. return threshold;
  90. }
  91. public void setAmount(BigDecimal amount)
  92. {
  93. this.amount = amount;
  94. }
  95. public BigDecimal getAmount()
  96. {
  97. return amount;
  98. }
  99. public void setDiscountRate(BigDecimal discountRate)
  100. {
  101. this.discountRate = discountRate;
  102. }
  103. public BigDecimal getDiscountRate()
  104. {
  105. return discountRate;
  106. }
  107. @Override
  108. public String toString() {
  109. return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
  110. .append("id", getId())
  111. .append("batchId", getBatchId())
  112. .append("productId", getProductId())
  113. .append("isMutex", getIsMutex())
  114. .append("threshold", getThreshold())
  115. .append("amount", getAmount())
  116. .append("discountRate", getDiscountRate())
  117. .toString();
  118. }
  119. }