package com.zd.laboratory.domain;

import com.zd.common.core.annotation.Excel;
import com.zd.common.core.valid.ValidGroup;
import com.zd.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 压力容器对象 lab_container
 *
 * @author zd
 * @date 2021-09-01
 */
@ApiModel("压力容器表")
public class LabContainer extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @ApiModelProperty(value = "${comment}")
    @NotBlank(groups = ValidGroup.Crud.Update.class, message = "id不能为空")
    private Long id;

    /**
     * 材质
     */
    @ApiModelProperty("材质")
    @Excel(name = "材质")
    @NotBlank(groups = ValidGroup.Crud.Update.class, message = "材质不能为空")
    private String materialQuality;

    /**
     * 规格
     */
    @ApiModelProperty("规格")
    @Excel(name = "规格")
    private String specs;

    /**
     * 品牌
     */
    @ApiModelProperty("品牌")
    @Excel(name = "品牌")
    private String brand;

    /**
     * 型号
     */
    @ApiModelProperty("型号")
    @Excel(name = "型号")
    private String market;

    /**
     * 容积
     */
    @ApiModelProperty("容积")
    @Excel(name = "容积")
    private String volume;

    /**
     * 最小压力
     */
    @ApiModelProperty("最小压力")
    @Excel(name = "最小压力")
    private String minPressure;

    /**
     * 最大压力
     */
    @ApiModelProperty("最大压力")
    @Excel(name = "最大压力")
    private String maxPressure;

    /**
     * 关联化学品id
     */
    @ApiModelProperty("关联化学品id")
    @Excel(name = "关联化学品id")
    @NotNull(groups = ValidGroup.Crud.Update.class, message = "关联化学品不能为空")
    private Long hazardId;

    /**
     * 部门id
     */
    @ApiModelProperty("部门id")
    @Excel(name = "部门id")
    private Long deptId;

    /**
     * 部门名称
     */
    @ApiModelProperty("部门名称")
    @Excel(name = "部门名称")
    private String deptName;

    /**
     * 创建人（用于数据权限）
     */
    @ApiModelProperty("创建人（用于数据权限）")
    @Excel(name = "创建人", readConverterExp = "用于数据权限")
    private Long userId;

    /**
     * 危险源和实验室关联信息
     */
    private List<LabHazardSubjectRelation> labHazardSubjectRelationList;

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

    public Long getId() {
        return id;
    }

    public void setMaterialQuality(String materialQuality) {
        this.materialQuality = materialQuality;
    }

    public String getMaterialQuality() {
        return materialQuality;
    }

    public void setSpecs(String specs) {
        this.specs = specs;
    }

    public String getSpecs() {
        return specs;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getBrand() {
        return brand;
    }

    public void setMarket(String market) {
        this.market = market;
    }

    public String getMarket() {
        return market;
    }

    public void setVolume(String volume) {
        this.volume = volume;
    }

    public String getVolume() {
        return volume;
    }

    public void setMinPressure(String minPressure) {
        this.minPressure = minPressure;
    }

    public String getMinPressure() {
        return minPressure;
    }

    public void setMaxPressure(String maxPressure) {
        this.maxPressure = maxPressure;
    }

    public String getMaxPressure() {
        return maxPressure;
    }

    public void setHazardId(Long hazardId) {
        this.hazardId = hazardId;
    }

    public Long getHazardId() {
        return hazardId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptName() {
        return deptName;
    }

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

    public Long getUserId() {
        return userId;
    }

    public List<LabHazardSubjectRelation> getLabHazardSubjectRelationList() {
        return labHazardSubjectRelationList;
    }

    public void setLabHazardSubjectRelationList(List<LabHazardSubjectRelation> labHazardSubjectRelationList) {
        this.labHazardSubjectRelationList = labHazardSubjectRelationList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("materialQuality", getMaterialQuality())
                .append("specs", getSpecs())
                .append("brand", getBrand())
                .append("market", getMarket())
                .append("volume", getVolume())
                .append("minPressure", getMinPressure())
                .append("maxPressure", getMaxPressure())
                .append("hazardId", getHazardId())
                .append("deptId", getDeptId())
                .append("createTime", getCreateTime())
                .append("deptName", getDeptName())
                .append("userId", getUserId())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .append("labHazardSubjectRelationList", getLabHazardSubjectRelationList())
                .toString();
    }
}
