package com.zd.chemical.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zd.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.zd.common.core.web.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;

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

/**
 * 化学品和机柜关联对象 hxp_cabinet_join_cabinet
 *
 * @author liubo
 * @date 2022-06-16
 */
@ApiModel("化学品和机柜关联")
public class HxpChemicalJoinCabinet extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "${comment}")
    private Long id;

    /**
     * 化学品关联编号
     */
    @Excel(name = "化学品关联编号")
    @ApiModelProperty(value = "化学品关联编号")
    private String joinNum;

    /**
     * 实验室ID
     */
    @Excel(name = "实验室ID")
    @ApiModelProperty(value = "实验室ID")
    private Long subId;

    /**
     * 化学品信息id
     */
    @Excel(name = "化学品信息id")
    @ApiModelProperty(value = "化学品信息id")
    private Long chemicalId;
    /**
     * 机柜管理id
     */
    @Excel(name = "机柜管理id")
    @ApiModelProperty(value = "机柜管理id")
    private Long cabinetId;

    /**
     * 化学品规格
     */
    @Excel(name = "化学品规格")
    @ApiModelProperty(value = "化学品规格")
    private BigDecimal chemicalAmount;

    /**
     * 化学品规格单位
     */
    @Excel(name = "化学品规格单位")
    @ApiModelProperty(value = "化学品规格单位")
    private String chemicalAmountUnit;

    /**
     * 过期时间
     */
    @Excel(name = "过期时间")
    @ApiModelProperty(value = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expireTime;

    /**
     * 创建人id
     */
    @Excel(name = "创建人id")
    @ApiModelProperty(value = "创建人id")
    private Long userId;

    @ApiModelProperty(value = "入库状态（0 未入库，1 已入库）")
    private Integer status;

    @ApiModelProperty(value = "容器重量")
    private BigDecimal tare;

    @ApiModelProperty(value = "机柜锁id   去硬件表里面找，用的是硬件表的id")
    private Long cabinetlockId;

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

    public Long getId() {
        return id;
    }

    public void setChemicalId(Long chemicalId) {
        this.chemicalId = chemicalId;
    }

    public Long getChemicalId() {
        return chemicalId;
    }

    public void setCabinetId(Long cabinetId) {
        this.cabinetId = cabinetId;
    }

    public Long getCabinetId() {
        return cabinetId;
    }

    @Override
    public Long getUserId() {
        return userId;
    }

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

    public Integer getStatus() {
        return status;
    }

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

    public String getJoinNum() {
        return joinNum;
    }

    public void setJoinNum(String joinNum) {
        this.joinNum = joinNum;
    }

    public Long getSubId() {
        return subId;
    }

    public void setSubId(Long subId) {
        this.subId = subId;
    }

    public BigDecimal getChemicalAmount() {
        return chemicalAmount;
    }

    public void setChemicalAmount(BigDecimal chemicalAmount) {
        this.chemicalAmount = chemicalAmount;
    }

    public String getChemicalAmountUnit() {
        return chemicalAmountUnit;
    }

    public void setChemicalAmountUnit(String chemicalAmountUnit) {
        this.chemicalAmountUnit = chemicalAmountUnit;
    }

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    public BigDecimal getTare() {
        return tare;
    }

    public void setTare(BigDecimal tare) {
        this.tare = tare;
    }

    public Long getCabinetlockId() {
        return cabinetlockId;
    }

    public void setCabinetlockId(Long cabinetlockId) {
        this.cabinetlockId = cabinetlockId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("chemicalId", getChemicalId())
                .append("cabinetId", getCabinetId())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .toString();
    }
}
