package com.yeejoin.amos.patrol.dao.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import org.hibernate.annotations.Where;

import javax.persistence.*;


/**
 * 检查项
 */
@Entity
@Table(name = "p_input_item")
@NamedQuery(name = "InputItem.findAll", query = "SELECT c FROM InputItem c")
@Where(clause = "is_delete=0")//表示未删除的数据
@TableName("p_input_item")
public class InputItem extends BasicEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 分类ID
     */
    @Column(name = "catalog_id")
    private Long catalogId;

    /**
     * 创建者
     */
    @Column(name = "create_by")
    private String createBy;

    /**
     * 配置JSON
     */
    @Lob
    @Column(name = "data_json")
    private String dataJson;

    /**
     * 默认值
     */
    @Column(name = "default_value")
    private String defaultValue;

    /**
     * 扩展项json
     */
    @Lob
    @Column(name = "input_json")
    private String inputJson;

    /**
     * 是否多选
     */
    @Column(name = "is_multiline")
    private String isMultiline;

    /**
     * 是否必填
     */
    @Column(name = "is_must")
    private String isMust;

    /**
     * 是否评分
     */
    @Column(name = "is_score")
    private String isScore;

    /**
     * 检查项类型
     */
    @Column(name = "item_type")
    private String itemType;

    /**
     * 检查项名称
     */
    private String name;

    /**
     * 排序编码
     */
    @Column(name = "order_no")
    private int orderNo;

    /**
     * 组织编码
     */
    @Column(name = "org_code")
    private String orgCode;

    /**
     * 拍照配置json
     */
    @Lob
    @Column(name = "picture_json")
    private String pictureJson;

    @Lob
    private String remark;

    /**
     * 是否删除：0表示未删除，1表示已删除
     */
    @Column(name = "is_delete")
    private boolean isDelete;

    /**
     * 等级
     */
    @Column(name = "level")
    private String level;

    /**
     * 检查项编号
     */
    @Column(name = "item_no")
    private String itemNo;

    /**
     * 原始字段
     */
    @Column(name = "original_id", columnDefinition = "varchar(50) COMMENT '原始字段'")
    private String originalId;

    /**
     * 标准依据
     */
    @Column(name = "basis_json", columnDefinition = "text COMMENT '标准依据'")
    private String basisJson;

    /**
     * 风险描述
     */
    @Column(name = "risk_desc")
    private String riskDesc;
    /**
     * 检测方法
     */
    @Column(name = "check_method")
    private String checkMethod;
    /**
     * 录入方式 0.表示手动录入，1.表示规则同步
     */
    @Column(name = "input_type")
    private Integer inputType;
    /**
     * 检查点分类
     */
    @Column(name = "input_classify")
    private String inputClassify;

    /**
     * 装备定义名称
     */
    @Column(name = "equipment_name")
    private String equipmentName;

    /**
     * 装备定义名称
     */
    @Column(name = "title")
    private String title;
    /**
     * 数字项默认值单位
     */
    @Column(name = "unit")
    private String unit;




    /**
     * 新加字段
     *
     * */
    //单位code
    @Column(name = "biz_org_code")
    private String bizOrgCode;
    //单位名称
    @Column(name = "biz_org_name")
    private String bizOrgName;
    //消防装备类型
    @Column(name = "equipment_type")
    private String equipmentType;
    //消防设施类型、
    @Column(name = "facilities_type")
    private String facilitiesType;
    // 重点类型
    @Column(name = "key_parts_type")
    private String keyPartsType;

    //自定义类型
    @Column(name = "custom_type")
    private String customType;

    public String getBizOrgCode() {
        return bizOrgCode;
    }

    public void setBizOrgCode(String bizOrgCode) {
        this.bizOrgCode = bizOrgCode;
    }

    public String getBizOrgName() {
        return bizOrgName;
    }

    public void setBizOrgName(String bizOrgName) {
        this.bizOrgName = bizOrgName;
    }

    public String getEquipmentType() {
        return equipmentType;
    }

    public void setEquipmentType(String equipmentType) {
        this.equipmentType = equipmentType;
    }

    public String getFacilitiesType() {
        return facilitiesType;
    }

    public void setFacilitiesType(String facilitiesType) {
        this.facilitiesType = facilitiesType;
    }

    public String getKeyPartsType() {
        return keyPartsType;
    }

    public void setKeyPartsType(String keyPartsType) {
        this.keyPartsType = keyPartsType;
    }

    public String getCustomType() {
        return customType;
    }

    public void setCustomType(String customType) {
        this.customType = customType;
    }



    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getEquipmentName() {
        return equipmentName;
    }

    public void setEquipmentName(String equipmentName) {
        this.equipmentName = equipmentName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getInputType() {
        return inputType;
    }

    public void setInputType(Integer inputType) {
        this.inputType = inputType;
    }

    public String getInputClassify() {
        return inputClassify;
    }

    public void setInputClassify(String inputClassify) {
        this.inputClassify = inputClassify;
    }

    public String getCheckMethod() {
        return checkMethod;
    }

    public void setCheckMethod(String checkMethod) {
        this.checkMethod = checkMethod;
    }

    public String getRiskDesc() {
		return riskDesc;
	}

	public void setRiskDesc(String riskDesc) {
		this.riskDesc = riskDesc;
	}

	public String getItemNo() {
        return itemNo;
    }

    public void setItemNo(String itemNo) {
        this.itemNo = itemNo;
    }

    public InputItem() {
    }

    public Long getCatalogId() {
        return this.catalogId;
    }

    public void setCatalogId(Long catalogId) {
        this.catalogId = catalogId;
    }

    public String getDataJson() {
        return this.dataJson;
    }

    public void setDataJson(String dataJson) {
        this.dataJson = dataJson;
    }

    public String getDefaultValue() {
        return this.defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getInputJson() {
        return this.inputJson;
    }

    public void setInputJson(String inputJson) {
        this.inputJson = inputJson;
    }

    public String getIsMultiline() {
        return this.isMultiline;
    }

    public void setIsMultiline(String isMultiline) {
        this.isMultiline = isMultiline;
    }

    public String getIsMust() {
        return this.isMust;
    }

    public void setIsMust(String isMust) {
        this.isMust = isMust;
    }

    public String getIsScore() {
        return this.isScore;
    }

    public void setIsScore(String isScore) {
        this.isScore = isScore;
    }

    public String getItemType() {
        return this.itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getOrderNo() {
        return this.orderNo;
    }

    public void setOrderNo(int orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public String getPictureJson() {
        return this.pictureJson;
    }

    public void setPictureJson(String pictureJson) {
        this.pictureJson = pictureJson;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(boolean isDelete) {
        this.isDelete = isDelete;
    }

    public boolean equals(Object obj) {
        if(obj!=null){
            InputItem inputItem = (InputItem) obj;
            return this.getId() == inputItem.getId();
        }else{
            return false;
        }

    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getOriginalId() {
        return originalId;
    }

    public void setOriginalId(String originalId) {
        this.originalId = originalId;
    }

    public String getBasisJson() {
        return basisJson;
    }

    public void setBasisJson(String basisJson) {
        this.basisJson = basisJson;
    }
}