package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.GeneratedValue;

/**
 * PromotionActivityRule对象 promotion_activity_rule
 *
 * @author ruoyi
 * @date 2024-05-30
 */
@Data
@TableName(value = "promotion_activity_rule")
@EqualsAndHashCode(callSuper = false)
public class PromotionActivityRule
{
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @GeneratedValue
    /** id */
    private Long id;

    /** 关联促销活动 */
    private Long activityId;

    /** 商品ID */
    private Long productId;

    /** 满减门槛 */
    private BigDecimal threshold;

    /** 减免金额 */
    private BigDecimal reduceAmount;

    /** 折扣率 */
    private BigDecimal discountRate;

    /** 最低数量 */
    private Integer minQuantity;

    /** 商品名称 */
    @TableField(exist = false)
    private String productName;

    /** 商品图片 */
    @TableField(exist = false)
    private String productImage;

    /** 商品价格 */
    @TableField(exist = false)
    private BigDecimal productPrice;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setActivityId(Long activityId)
    {
        this.activityId = activityId;
    }

    public Long getActivityId()
    {
        return activityId;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setThreshold(BigDecimal threshold)
    {
        this.threshold = threshold;
    }

    public BigDecimal getThreshold()
    {
        return threshold;
    }

    public void setReduceAmount(BigDecimal reduceAmount)
    {
        this.reduceAmount = reduceAmount;
    }

    public BigDecimal getReduceAmount()
    {
        return reduceAmount;
    }

    public void setDiscountRate(BigDecimal discountRate)
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate()
    {
        return discountRate;
    }

    public void setMinQuantity(Integer minQuantity)
    {
        this.minQuantity = minQuantity;
    }

    public Integer getMinQuantity()
    {
        return minQuantity;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("activityId", getActivityId())
            .append("productId", getProductId())
            .append("threshold", getThreshold())
            .append("reduceAmount", getReduceAmount())
            .append("discountRate", getDiscountRate())
            .append("minQuantity", getMinQuantity())
            .toString();
    }
}
