package com.steerinfo.ems.chemicalconstituents.model;

import com.steerinfo.framework.model.ICBasePO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@ApiModel(value="null")
public class ChemicalConstituents implements ICBasePO<ChemicalConstituents> {
    /**
     * GMid(GMID,VARCHAR,100)
     */
    @ApiModelProperty(value="GMid",required=true)
    private String gmid;

    /**
     * 成分编码(CHEM_CODE,VARCHAR,100)
     */
    @ApiModelProperty(value="成分编码",required=true)
    private String chemCode;

    /**
     * 内控下限值(NK_STD_MIN,DECIMAL,0)
     */
    @ApiModelProperty(value="内控下限值",required=false)
    private BigDecimal nkStdMin;

    /**
     * 内控上限值(NK_STD_MAX,DECIMAL,0)
     */
    @ApiModelProperty(value="内控上限值",required=false)
    private BigDecimal nkStdMax;

    private static final long serialVersionUID = 1L;

    @Override
    public Map<String, Object> getId() {
        Map<String, Object> params = new HashMap<>();
        params.put("gmid",this.gmid);
        params.put("chemCode",this.chemCode);
        return params;
    }

    @Override
    public void setId(ChemicalConstituents chemicalConstituents) {
        this.gmid = chemicalConstituents.getGmid();
        this.chemCode = chemicalConstituents.getChemCode();
    }

    public String getGmid() {
        return gmid;
    }

    public void setGmid(String gmid) {
        this.gmid = gmid == null ? null : gmid.trim();
    }

    public String getChemCode() {
        return chemCode;
    }

    public void setChemCode(String chemCode) {
        this.chemCode = chemCode == null ? null : chemCode.trim();
    }

    public BigDecimal getNkStdMin() {
        return nkStdMin;
    }

    public void setNkStdMin(BigDecimal nkStdMin) {
        this.nkStdMin = nkStdMin;
    }

    public BigDecimal getNkStdMax() {
        return nkStdMax;
    }

    public void setNkStdMax(BigDecimal nkStdMax) {
        this.nkStdMax = nkStdMax;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gmid=").append(gmid);
        sb.append(", chemCode=").append(chemCode);
        sb.append(", nkStdMin=").append(nkStdMin);
        sb.append(", nkStdMax=").append(nkStdMax);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}