package com.ruoyi.system.domain;

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

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;

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

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

    /** 订单ID */
    private Long orderId;

    /** 促销类型: 1=活动促销 2=优惠券 */
    private Integer promoType;

    /** 促销子类型: 1=满减 2=折扣 3=第二份半价 4=新客立减 */
    private Integer promoSubType;

    /** 促销活动ID */
    private Long promoId;

    /** 用户优惠券ID */
    private Long userCouponId;

    /** 促销名称 */
    private String promoName;

    /** 促销详情 */
    private String promoDetail;

    /** 优惠金额 */
    private BigDecimal reduceAmount;

    /** 命中规则摘要 */
    private String pathSummary;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

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

    public Long getId()
    {
        return id;
    }

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }

    public void setPromoType(Integer promoType)
    {
        this.promoType = promoType;
    }

    public Integer getPromoType()
    {
        return promoType;
    }

    public void setPromoSubType(Integer promoSubType)
    {
        this.promoSubType = promoSubType;
    }

    public Integer getPromoSubType()
    {
        return promoSubType;
    }

    public void setPromoId(Long promoId)
    {
        this.promoId = promoId;
    }

    public Long getPromoId()
    {
        return promoId;
    }

    public void setUserCouponId(Long userCouponId)
    {
        this.userCouponId = userCouponId;
    }

    public Long getUserCouponId()
    {
        return userCouponId;
    }

    public void setPromoName(String promoName)
    {
        this.promoName = promoName;
    }

    public String getPromoName()
    {
        return promoName;
    }

    public void setPromoDetail(String promoDetail)
    {
        this.promoDetail = promoDetail;
    }

    public String getPromoDetail()
    {
        return promoDetail;
    }

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

    public BigDecimal getReduceAmount()
    {
        return reduceAmount;
    }

    public void setPathSummary(String pathSummary)
    {
        this.pathSummary = pathSummary;
    }

    public String getPathSummary()
    {
        return pathSummary;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }

    public Date getCreateTime()
    {
        return createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("promoType", getPromoType())
            .append("promoSubType", getPromoSubType())
            .append("promoId", getPromoId())
            .append("userCouponId", getUserCouponId())
            .append("promoName", getPromoName())
            .append("promoDetail", getPromoDetail())
            .append("reduceAmount", getReduceAmount())
            .append("pathSummary", getPathSummary())
            .append("createTime", getCreateTime())
            .toString();
    }
}
