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 com.ruoyi.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.GeneratedValue;
import com.ruoyi.common.core.domain.BaseEntity;

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

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

    /** 活动名称 */
    @Excel(name = "活动名称")
    private String salesName;

    /** 减免方式：1 运费，2 订单 ,3 商品 */
    @Excel(name = "减免方式")
    private String salesType;

    /** 减免值 */
    @Excel(name = "减免值")
    private BigDecimal salesReduction;

    /** 活动商家id */
    @Excel(name = "活动商家id")
    private Long shId;

    /** 活动商品id */
    @Excel(name = "活动商品id")
    private Long spId;

    /** 使用条件 */
    @Excel(name = "使用条件")
    private Long salesCondition;

    /** 可享受次数 */
    @Excel(name = "可享受次数")
    private Long salesFund;

    /** 活动结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "活动结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 活动状态 */
    @Excel(name = "活动状态")
    private String salesState;

    /** 活动说明 */
    @Excel(name = "活动说明")
    private String illustrate;

    /** 海报 */
    @Excel(name = "海报")
    private String poster;

    /**
     * 0 平台  1 商家
     */
    public String type;

    /**
     * 语言
     */
    private String language;
    /**
     * 删除状态
     */
    private String deleted;

    /**
     *  是否还能编辑
     */
    @TableField(exist = false)
    private boolean isEdit;


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

    public Long getId()
    {
        return id;
    }
    public void setSalesName(String salesName)
    {
        this.salesName = salesName;
    }

    public String getSalesName()
    {
        return salesName;
    }
    public void setSalesType(String salesType)
    {
        this.salesType = salesType;
    }

    public String getSalesType()
    {
        return salesType;
    }
    public void setSalesReduction(BigDecimal salesReduction)
    {
        this.salesReduction = salesReduction;
    }

    public BigDecimal getSalesReduction()
    {
        return salesReduction;
    }
    public void setShId(Long shId)
    {
        this.shId = shId;
    }

    public Long getShId()
    {
        return shId;
    }
    public void setSpId(Long spId)
    {
        this.spId = spId;
    }

    public Long getSpId()
    {
        return spId;
    }
    public void setSalesCondition(Long salesCondition)
    {
        this.salesCondition = salesCondition;
    }

    public Long getSalesCondition()
    {
        return salesCondition;
    }
    public void setSalesFund(Long salesFund)
    {
        this.salesFund = salesFund;
    }

    public Long getSalesFund()
    {
        return salesFund;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setSalesState(String salesState)
    {
        this.salesState = salesState;
    }

    public String getSalesState()
    {
        return salesState;
    }
    public void setIllustrate(String illustrate)
    {
        this.illustrate = illustrate;
    }

    public String getIllustrate()
    {
        return illustrate;
    }

    public String getPoster() {
        return poster;
    }

    public void setPoster(String poster) {
        this.poster = poster;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("salesName", getSalesName())
            .append("salesType", getSalesType())
            .append("salesReduction", getSalesReduction())
            .append("shId", getShId())
            .append("spId", getSpId())
            .append("salesCondition", getSalesCondition())
            .append("salesFund", getSalesFund())
            .append("endTime", getEndTime())
            .append("salesState", getSalesState())
            .append("illustrate", getIllustrate())
            .append("poster", getPoster())
            .toString();
    }
}
