package com.ruoyi.asset.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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;

/**
 * 资产设备状态记录对象 tb_asset_status_record
 * 
 * @author 原动力
 * @date 2023-03-27
 */
@TableName("tb_asset_status_record")
public class TbAssetStatusRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录编号 */
    @Excel(name = "记录编号")
    @TableId("id")
    private Long id;

    /** 设备条形码 */
    @Excel(name = "设备条形码")
    @TableField("asset_bar_code")
    private String assetBarCode;

    /** 借用次数 */
    @Excel(name = "借用次数")
    @TableField("borrow_number")
    private Long borrowNumber;

    /** 故障次数 */
    @Excel(name = "故障次数")
    @TableField("fault_number")
    private Long faultNumber;

    /** 最近故障时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近故障时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("last_fault_date")
    private Date lastFaultDate;

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

    public Long getId() 
    {
        return id;
    }
    public void setAssetBarCode(String assetBarCode) 
    {
        this.assetBarCode = assetBarCode;
    }

    public String getAssetBarCode() 
    {
        return assetBarCode;
    }
    public void setBorrowNumber(Long borrowNumber) 
    {
        this.borrowNumber = borrowNumber;
    }

    public Long getBorrowNumber() 
    {
        return borrowNumber;
    }
    public void setFaultNumber(Long faultNumber) 
    {
        this.faultNumber = faultNumber;
    }

    public Long getFaultNumber() 
    {
        return faultNumber;
    }
    public void setLastFaultDate(Date lastFaultDate) 
    {
        this.lastFaultDate = lastFaultDate;
    }

    public Date getLastFaultDate() 
    {
        return lastFaultDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("assetBarCode", getAssetBarCode())
            .append("borrowNumber", getBorrowNumber())
            .append("faultNumber", getFaultNumber())
            .append("lastFaultDate", getLastFaultDate())
            .toString();
    }
}
