package com.zd.laboratory.domain;

import com.zd.common.core.annotation.Excel;
import com.zd.common.core.enums.HazardTypeEnum;
import com.zd.common.core.web.domain.BaseEntity;
import com.zd.laboratory.interfaces.HazardTypeInterface;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * 危险源对象 lab_hazard
 *
 * @author zd
 * @date 2021-09-01
 */
@ApiModel("危险源表")
public class LabHazard extends BaseEntity implements HazardTypeInterface {
    private static final long serialVersionUID = 1L;

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

    /**
     * 中文名称
     */
    @ApiModelProperty("中文名称")
    @Excel(name = "中文名称")
    @NotBlank(message = "中文名称不能为空")
    private String chName;

    /**
     * 英文名称
     */
    @ApiModelProperty("英文名称")
    @Excel(name = "英文名称")
    private String enName;

    /**
     * cas编号
     */
    @ApiModelProperty("cas编号")
    @Excel(name = "cas编号")
    private String casNo;

    /**
     * 危规号
     */
    @ApiModelProperty("危规号")
    @Excel(name = "危规号")
    private String dangerCode;

    /**
     * 燃烧性
     */
    @ApiModelProperty("燃烧性")
    @Excel(name = "燃烧性")
    private String flammability;

    /**
     * 燃点（引燃温度）
     */
    @ApiModelProperty("燃点（引燃温度）")
    @Excel(name = "燃点", readConverterExp = "引=燃温度")
    private Double ignitionPoint;

    /**
     * 燃烧分解产物
     */
    @ApiModelProperty("燃烧分解产物")
    @Excel(name = "燃烧分解产物")
    private String combustionProducts;

    /**
     * 稳定性
     */
    @ApiModelProperty("稳定性")
    @Excel(name = "稳定性")
    private String stability;

    /**
     * 禁忌物
     */
    @ApiModelProperty("禁忌物")
    @Excel(name = "禁忌物")
    private String taboo;

    /**
     * 皮肤接触急救
     */
    @ApiModelProperty("皮肤接触急救")
    @Excel(name = "皮肤接触急救")
    private String skinContactAid;

    /**
     * 眼睛接触急救
     */
    @ApiModelProperty("眼睛接触急救")
    @Excel(name = "眼睛接触急救")
    private String eyeContactAid;

    /**
     * 吸入急救
     */
    @ApiModelProperty("吸入急救")
    @Excel(name = "吸入急救")
    private String inhalationAid;

    /**
     * 食入急救
     */
    @ApiModelProperty("食入急救")
    @Excel(name = "食入急救")
    private String ingestionAid;

    /**
     * 工程防护
     */
    @ApiModelProperty("工程防护")
    @Excel(name = "工程防护")
//    @NotBlank(groups = ValidGroup.Crud.Create.class, message = "工程防护不能为空")
    private String engineeringProtection;

    /**
     * 个人防护
     */
    @ApiModelProperty("个人防护")
    @Excel(name = "个人防护")
//    @NotBlank(groups = ValidGroup.Crud.Create.class, message = "个人防护不能为空")
    private String personalProtection;

    /**
     * 贮运方法
     */
    @ApiModelProperty("贮运方法")
    @Excel(name = "贮运方法")
    private String storage;

    /**
     * 泄漏处理
     */
    @ApiModelProperty("泄漏处理")
    @Excel(name = "泄漏处理")
    private String leakageTreatment;

    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    private String code;
    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    private String content;
    /**
     * 二维码地址
     */
    @ApiModelProperty(value = "二维码地址")
    private String qrCodeUrl;
    /**
     * 查看次数
     */
    @ApiModelProperty(value = "查看次数")
    private Integer scanCount = 0;

    /**
     * 危险源类型（查看字典表lab_hazard_type）
     */
    @ApiModelProperty(value = "危险源类型（查看字典表lab_hazard_type）")
    private Integer hazardTypeMode;

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

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

    public Long getId() {
        return id;
    }

    public void setChName(String chName) {
        this.chName = chName;
    }

    public String getChName() {
        return chName;
    }

    public void setEnName(String enName) {
        this.enName = enName;
    }

    public String getEnName() {
        return enName;
    }

    public void setCasNo(String casNo) {
        this.casNo = casNo;
    }

    public String getCasNo() {
        return casNo;
    }

    public void setDangerCode(String dangerCode) {
        this.dangerCode = dangerCode;
    }

    public String getDangerCode() {
        return dangerCode;
    }

    public void setFlammability(String flammability) {
        this.flammability = flammability;
    }

    public String getFlammability() {
        return flammability;
    }

    public void setCombustionProducts(String combustionProducts) {
        this.combustionProducts = combustionProducts;
    }

    public String getCombustionProducts() {
        return combustionProducts;
    }

    public void setStability(String stability) {
        this.stability = stability;
    }

    public String getStability() {
        return stability;
    }

    public void setTaboo(String taboo) {
        this.taboo = taboo;
    }

    public String getTaboo() {
        return taboo;
    }

    public void setSkinContactAid(String skinContactAid) {
        this.skinContactAid = skinContactAid;
    }

    public String getSkinContactAid() {
        return skinContactAid;
    }

    public void setEyeContactAid(String eyeContactAid) {
        this.eyeContactAid = eyeContactAid;
    }

    public String getEyeContactAid() {
        return eyeContactAid;
    }

    public void setInhalationAid(String inhalationAid) {
        this.inhalationAid = inhalationAid;
    }

    public String getInhalationAid() {
        return inhalationAid;
    }

    public void setIngestionAid(String ingestionAid) {
        this.ingestionAid = ingestionAid;
    }

    public String getIngestionAid() {
        return ingestionAid;
    }

    public void setEngineeringProtection(String engineeringProtection) {
        this.engineeringProtection = engineeringProtection;
    }

    public String getEngineeringProtection() {
        return engineeringProtection;
    }

    public void setPersonalProtection(String personalProtection) {
        this.personalProtection = personalProtection;
    }

    public String getPersonalProtection() {
        return personalProtection;
    }

    public void setStorage(String storage) {
        this.storage = storage;
    }

    public String getStorage() {
        return storage;
    }

    public void setLeakageTreatment(String leakageTreatment) {
        this.leakageTreatment = leakageTreatment;
    }

    public String getLeakageTreatment() {
        return leakageTreatment;
    }

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

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

    public Double getIgnitionPoint() {
        return ignitionPoint;
    }

    public void setIgnitionPoint(Double ignitionPoint) {
        this.ignitionPoint = ignitionPoint;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getQrCodeUrl() {
        return qrCodeUrl;
    }

    public void setQrCodeUrl(String qrCodeUrl) {
        this.qrCodeUrl = qrCodeUrl;
    }

    public Integer getScanCount() {
        return scanCount;
    }

    public void setScanCount(Integer scanCount) {
        this.scanCount = scanCount;
    }

    @Override
    public HazardTypeEnum azardType() {
        return HazardTypeEnum.HAZARD;
    }

    public Integer getHazardTypeMode() {
        return hazardTypeMode;
    }

    public void setHazardTypeMode(Integer hazardTypeMode) {
        this.hazardTypeMode = hazardTypeMode;
    }
}
