package beilv.userbill.domain;

import beilv.common.annotation.Excel;
import beilv.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

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

/**
 * 用户积分流水对象 sys_user_bill
 *
 * @author ruoyi
 * @date 2024-12-31
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SysUserBill {
    private static final long serialVersionUID = 1L;

    /**
     * 用户账单id
     */
    private Long id;

    /**
     * 用户uid
     */
    private Long userId;

    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    private String username;

    /**
     * 0 = 支出 1 = 获得
     */
    @Excel(name = "0 = 支出 1 = 获得")
    private Integer pm;

    /**
     * 账单标题
     */
    @Excel(name = "账单标题")
    private String title;

    /**
     * 明细数字
     */
    @Excel(name = "明细数字")
    private BigDecimal number;

    /**
     * 剩余
     */
    @Excel(name = "剩余")
    private BigDecimal balance;

    /**
     * 积分用途
     */
    @Excel(name = "积分用途")
    private String useCategory;

    /**
     * 0 = 带确定 1 = 有效 -1 = 无效
     */
    private Integer status;

    /** 创建者 */
    private String createBy;

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

    /** 更新者 */
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /** 备注 */
    private String remark;

    /**
     * 删除(0:正常；1:删除)
     */
    private Integer delFlag;

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

    public Long getId() {
        return id;
    }

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

    public Long getUserId() {
        return userId;
    }

    public void setPm(Integer pm) {
        this.pm = pm;
    }

    public Integer getPm() {
        return pm;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setNumber(BigDecimal number) {
        this.number = number;
    }

    public BigDecimal getNumber() {
        return number;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setUseCategory(String useCategory) {
        this.useCategory = useCategory;
    }

    public String getUseCategory() {
        return useCategory;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

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

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("pm", getPm())
                .append("title", getTitle())
                .append("number", getNumber())
                .append("balance", getBalance())
                .append("useCategory", getUseCategory())
                .append("remark", getRemark())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .append("username", getUsername())
                .toString();
    }
}
