package com.ruoyi.mall.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户积分记录对象 mall_member_integral
 *
 * @author ruoyi
 * @date 2024-06-21
 */
public class MallMemberIntegral extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 积分记录id */
    private Long integralId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 改变的积分 */
    @Excel(name = "改变的积分")
    private BigDecimal integral;

    /** 积分记录标识（0-支付订单，1-取消订单，2-扣除，3-增加，4-兑换优惠券） */
    @Excel(name = "积分记录标识", readConverterExp = "0=-支付订单，1-取消订单，2-扣除，3-增加，4-兑换优惠券")
    private Integer mark;

    /** 类型（0-收入，1-支出） */
    @Excel(name = "类型", readConverterExp = "0=-收入，1-支出")
    private Integer type;

    /** 发放类型：0-用户领取，1-管理员发放， */
    @Excel(name = "发放类型：0-用户领取，1-管理员发放，")
    private Integer sendType;

    /** 发放人ID */
    @Excel(name = "发放人ID")
    private Long sendId;

    /** 相关资源id */
    @Excel(name = "相关资源id")
    private Long resId;

    /** 相关资源名 */
    @Excel(name = "相关资源名")
    private String resName;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateAt;

    /** 删除标记（0-正常，1-删除） */
    @Excel(name = "删除标记", readConverterExp = "0=-正常，1-删除")
    private Integer delFlag;

    public void setIntegralId(Long integralId)
    {
        this.integralId = integralId;
    }

    public Long getIntegralId()
    {
        return integralId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setIntegral(BigDecimal integral)
    {
        this.integral = integral;
    }

    public BigDecimal getIntegral()
    {
        return integral;
    }
    public void setMark(Integer mark)
    {
        this.mark = mark;
    }

    public Integer getMark()
    {
        return mark;
    }
    public void setType(Integer type)
    {
        this.type = type;
    }

    public Integer getType()
    {
        return type;
    }
    public void setSendType(Integer sendType)
    {
        this.sendType = sendType;
    }

    public Integer getSendType()
    {
        return sendType;
    }
    public void setSendId(Long sendId)
    {
        this.sendId = sendId;
    }

    public Long getSendId()
    {
        return sendId;
    }
    public void setResId(Long resId)
    {
        this.resId = resId;
    }

    public Long getResId()
    {
        return resId;
    }
    public void setResName(String resName)
    {
        this.resName = resName;
    }

    public String getResName()
    {
        return resName;
    }
    public void setCreateAt(Date createAt)
    {
        this.createAt = createAt;
    }

    public Date getCreateAt()
    {
        return createAt;
    }
    public void setUpdateAt(Date updateAt)
    {
        this.updateAt = updateAt;
    }

    public Date getUpdateAt()
    {
        return updateAt;
    }
    public void setDelFlag(Integer delFlag)
    {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("integralId", getIntegralId())
            .append("userId", getUserId())
            .append("integral", getIntegral())
            .append("mark", getMark())
            .append("type", getType())
            .append("sendType", getSendType())
            .append("sendId", getSendId())
            .append("resId", getResId())
            .append("resName", getResName())
            .append("createAt", getCreateAt())
            .append("updateAt", getUpdateAt())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
