package com.iamberry.wechat.core.entity.integral;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.iamberry.wechat.core.entity.PageBean;
import org.springframework.format.annotation.DateTimeFormat;

import javax.xml.crypto.Data;
import java.io.Serializable;

/**
 * 积分使用实体类
 */
public class UseIntegral implements Serializable {

    private static final long serialVersionUID = 8060941187906868547L;
    private Integer useIntegralId;          //ID
    private String userOpenId;              //用户openid
    private Integer useType;                //积分类型
    private Integer useIntegralType;        //使用积分类型
    private Integer useIntegralNumber;      //使用积分数量
    private Integer useConfigId;            //积分来源类型
    private String useIntegralRemarks;      //备注
    private Integer integralBeforeNumber;   //变动前可用积分总额
    private Integer integralEndNumber;      //变动后可用积分总额
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private Data useIntegralCreateTime;     //创建时间

    private String integralConfigName;      //来源名称
    private PageBean page=new PageBean();   //分页

    public Integer getIntegralBeforeNumber() {
        return integralBeforeNumber;
    }

    public void setIntegralBeforeNumber(Integer integralBeforeNumber) {
        this.integralBeforeNumber = integralBeforeNumber;
    }

    public Integer getIntegralEndNumber() {
        return integralEndNumber;
    }

    public void setIntegralEndNumber(Integer integralEndNumber) {
        this.integralEndNumber = integralEndNumber;
    }

    public PageBean getPage() {
        return page;
    }

    public void setPage(PageBean page) {
        this.page = page;
    }

    public String getIntegralConfigName() {
        return integralConfigName;
    }

    public void setIntegralConfigName(String integralConfigName) {
        this.integralConfigName = integralConfigName;
    }

    public Integer getUseIntegralId() {
        return useIntegralId;
    }

    public void setUseIntegralId(Integer useIntegralId) {
        this.useIntegralId = useIntegralId;
    }

    public String getUserOpenId() {
        return userOpenId;
    }

    public void setUserOpenId(String userOpenId) {
        this.userOpenId = userOpenId;
    }

    public Integer getUseType() {
        return useType;
    }

    public void setUseType(Integer useType) {
        this.useType = useType;
    }

    public Integer getUseIntegralType() {
        return useIntegralType;
    }

    public void setUseIntegralType(Integer useIntegralType) {
        this.useIntegralType = useIntegralType;
    }

    public Integer getUseIntegralNumber() {
        return useIntegralNumber;
    }

    public void setUseIntegralNumber(Integer useIntegralNumber) {
        this.useIntegralNumber = useIntegralNumber;
    }

    public Integer getUseConfigId() {
        return useConfigId;
    }

    public void setUseConfigId(Integer useConfigId) {
        this.useConfigId = useConfigId;
    }

    public String getUseIntegralRemarks() {
        return useIntegralRemarks;
    }

    public void setUseIntegralRemarks(String useIntegralRemarks) {
        this.useIntegralRemarks = useIntegralRemarks;
    }

    public Data getUseIntegralCreateTime() {
        return useIntegralCreateTime;
    }

    public void setUseIntegralCreateTime(Data useIntegralCreateTime) {
        this.useIntegralCreateTime = useIntegralCreateTime;
    }

    @Override
    public String toString() {
        return "UseIntegral{" +
                "useIntegralId=" + useIntegralId +
                ", userOpenId='" + userOpenId + '\'' +
                ", useType=" + useType +
                ", useIntegralType=" + useIntegralType +
                ", useIntegralNumber=" + useIntegralNumber +
                ", useConfigid=" + useConfigId +
                ", useIntegralRemarks='" + useIntegralRemarks + '\'' +
                ", useIntegralCreateTime=" + useIntegralCreateTime +
                '}';
    }
}
