/*
 * ********************************************************************************************************************
 *
 *                     :*$@@%$*:                         ;:                ;;    ;;
 *                   :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
 *                  :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
 *                  =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
 *                  =@*                                  %!              @ $= % %@=   =%@!      %=
 *             *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
 *           %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
 *         ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
 *         $@*   ;@@@%=!:                *@*
 *         =@$    ;;;!=%@@@@=!           =@!
 *          %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
 *           ;%@@$=$@@%*       *@@@$=%@@%;
 *              ::;::             ::;::                                              All rights reserved.
 *
 * ********************************************************************************************************************
 */

package cn.sagacloud.server.datacenter.models.entities

import cn.sagacloud.server.datacenter.models.entities.base.BaseInfo
import com.alibaba.fastjson.annotation.JSONField
import com.alibaba.fastjson.serializer.SerializerFeature
import com.fasterxml.jackson.annotation.JsonInclude
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 设备信息实体类
 *
 * @author  张维新
 */
@ApiModel(description = "设备信息实体类")
@Table(name = "equipment")
@JsonInclude(JsonInclude.Include.ALWAYS )
open class EquipmentSyn : BaseInfo() {

    /** 设备id */
    @ApiModelProperty(value = "设备id",required = true)
    @Id
    @Column(name = "id")
    @JSONField(name = "EquipID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])

    var id: String? = null

    /** 设备名称 */
    @ApiModelProperty(value = "设备名称",required = true)
    @Column(name = "name")
    @JSONField(name = "EquipName",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var name: String? = null

    /** 设备本地编码 */
    @ApiModelProperty(value = "设备本地编码")
    @Column(name = "local_id")
    @JSONField(name = "EquipLocalID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var localId: String? = null

    /** 设备本地名称 */
    @ApiModelProperty(value = "设备本地名称")
    @Column(name = "local_name")
    @JSONField(name = "EquipLocalName",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var localName: String? = null

    /** 设备二维码照片 */
    @ApiModelProperty(value = "设备二维码照片")
    @Column(name = "qr_code")
    @JSONField(name = "EquipQRCode",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var qrCode: String? = null

    /** 设计图纸中编码 */
    @ApiModelProperty(value = "设计图纸中编码")
    @Column(name = "cad_id")
    @JSONField(name = "CADID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var cadId: String? = null

    /** BIM模型中编码 */
    @ApiModelProperty(value = "BIM模型中编码")
    @Column(name = "bim_id")
    @JSONField(name = "BIMID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var bimId: String? = null

    /** BIM模型中坐标 */
    @ApiModelProperty(value = "BIM模型中坐标")
    @Column(name = "bim_location")
    @JSONField(name = "BIMLocation",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var bimLocation: String? = null

    /** 项目id */
    @ApiModelProperty(value = "项目id",required = true)
    @Column(name = "project_id")
    @JSONField(name = "ProjectId",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var projectId: String? = null

    /** 设备类型code */
    @ApiModelProperty(value = "设备类型code")
    @Column(name = "category")
    @JSONField(name = "Category",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var category: String? = null

    /** 设备所在建筑id */
    @ApiModelProperty(value = "设备所在建筑id")
    @Column(name = "building_id")
    @JSONField(name = "BuildingId",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var buildingId: String? = null

    /** 设备所在楼层id */
    @ApiModelProperty(value = "设备所在楼层id")
    @Column(name = "floor_id")
    @JSONField(name = "FloorId",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var floorId: String? = null

//    /** 设备关联的资产id */
//    @ApiModelProperty(value = "设备关联的资产id")
//    @Column(name = "property_id" ,insertable = true, updatable = false)
//    @JSONField(name = "PropertyId")
//    var propertyId: String? = null

    /** 品牌型号id */
    @ApiModelProperty(value = "品牌型号id")
    @Column(name = "dp_manufacturer_id")
    @JSONField(name = "DPManufacturerID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var dpManufacturerID: String? = null

    /** 供应商信息id */
    @ApiModelProperty(value = "供应商信息id")
    @Column(name = "dp_supplier_id")
    @JSONField(name = "DPSupplierID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var dpSupplierID: String? = null

    /** 维修商信息id */
    @ApiModelProperty(value = "维修商信息id")
    @Column(name = "dp_maintainer_id")
    @JSONField(name = "DPMaintainerID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var dpMaintainerID: String? = null

    /** 保险公司信息id */
    @ApiModelProperty(value = "保险公司信息id")
    @Column(name = "dp_insurer_id")
    @JSONField(name = "DPInsurerID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var dpInsurerID: String? = null

    /** 台账参数 */
    @ApiModelProperty(value = "台账参数")
    @Column(name = "ledger_param")
    @JSONField(name = "LedgerParam",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var ledgerParam: HashMap<String,Any?>? = null

    /** 通讯参数 */
    @ApiModelProperty(value = "通讯参数")
    @Column(name = "comm_param")
    @JSONField(name = "CommParam",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var commParam: HashMap<String,Any?>? = null

    /** 技术参数 */
    @ApiModelProperty(value = "技术参数")
    @Column(name = "tech_param")
    @JSONField(name = "TechParam",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var techParam: HashMap<String,Any?>? = null

    /** 运行参数 */
    @ApiModelProperty(value = "运行参数")
    @Column(name = "run_param")
    @JSONField(name = "RunParam",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var runParam: HashMap<String,Any?>? = null

    /** 设定参数 */
    @ApiModelProperty(value = "设定参数")
    @Column(name = "setting_param")
    @JSONField(name = "SettingParam",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var settingParam: HashMap<String,Any?>? = null

    /** 报警信息 */
    @ApiModelProperty(value = "报警信息")
    @Column(name = "alram")
    @JSONField(name = "Alram",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var alram: HashMap<String,Any?>? = null

    /** 自定义 */
    @ApiModelProperty(value = "自定义")
    @Column(name = "custom_param")
    @JSONField(name = "CustomParam",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var customParam: HashMap<String,Any?>? = null

    /** 部件关联设备id */
    @ApiModelProperty(value = "部件关联设备id")
    @Column(name = "parent_id")
    @JSONField(name = "ParentId",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var parentId: String? = null

    /** 温度传感器 */
    @ApiModelProperty(value = "温度传感器")
    @Column(name = "temp_sensor")
    @JSONField(name = "TempSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var tempSensor: HashMap<String,Any?>? = null

    /** 技术参数-通用 */
    @ApiModelProperty(value = "技术参数-通用")
    @Column(name = "tech_param_general")
    @JSONField(name = "TechParamGeneral",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var techParamGeneral: HashMap<String,Any?>? = null

    /** 运行参数-通用 */
    @ApiModelProperty(value = "运行参数-通用")
    @Column(name = "run_param_general")
    @JSONField(name = "RunParamGeneral",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var runParamGeneral: HashMap<String,Any?>? = null

    /** 速度传感器 */
    @ApiModelProperty(value = "速度传感器")
    @Column(name = "speed_sensor")
    @JSONField(name = "SpeedSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var speedSensor: HashMap<String,Any?>? = null

    /** 声音传感器 */
    @ApiModelProperty(value = "声音传感器")
    @Column(name = "sound_sensor")
    @JSONField(name = "SoundSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var soundSensor: HashMap<String,Any?>? = null

    /** 湿度传感器 */
    @ApiModelProperty(value = "湿度传感器")
    @Column(name = "humidity_sensor")
    @JSONField(name = "HumiditySensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var humiditySensor: HashMap<String,Any?>? = null

    /** 压力传感器 */
    @ApiModelProperty(value = "压力传感器")
    @Column(name = "press_transd")
    @JSONField(name = "PressTransd",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var pressTransd: HashMap<String,Any?>? = null

    /** 热量传感器 */
    @ApiModelProperty(value = "热量传感器")
    @Column(name = "heat_sensor")
    @JSONField(name = "HeatSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var heatSensor: HashMap<String,Any?>? = null

    /** 流量传感器 */
    @ApiModelProperty(value = "流量传感器")
    @Column(name = "flow_sensor")
    @JSONField(name = "FlowSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var flowSensor: HashMap<String,Any?>? = null

    /** 电度传感器 */
    @ApiModelProperty(value = "电度传感器")
    @Column(name = "electricity_sensor")
    @JSONField(name = "ElectricitySensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var electricitySensor: HashMap<String,Any?>? = null

    /** 位移传感器 */
    @ApiModelProperty(value = "位移传感器")
    @Column(name = "displ_sensor")
    @JSONField(name = "DisplSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var displSensor: HashMap<String,Any?>? = null

    /** 浓度传感器 */
    @ApiModelProperty(value = "浓度传感器")
    @Column(name = "concent_sensor")
    @JSONField(name = "ConcentSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var concentSensor: HashMap<String,Any?>? = null

    /** 图像传感器 */
    @ApiModelProperty(value = "图像传感器")
    @Column(name = "image_sensor")
    @JSONField(name = "ImageSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var imageSensor: HashMap<String,Any?>? = null

    /** 反馈参数 */
    @ApiModelProperty(value = "反馈参数")
    @Column(name = "feedback_param")
    @JSONField(name = "FeedbackParam",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    @JsonInclude(JsonInclude.Include.ALWAYS )
    var feedbackParam: HashMap<String,Any?>? = null

    /** 人流量传感器 */
    @ApiModelProperty(value = "人流量传感器")
    @Column(name = "man_flow_sensor")
    @JSONField(name = "ManFlowSensor",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var manFlowSensor: HashMap<String,Any?>? = null

    /** Revit族 */
    @ApiModelProperty(value = "Revit族 ")
    @Column(name = "family_name")
    @JSONField(name = "BIMFamilyName",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var familyName: String? = null

    /** Revit族类型 */
    @ApiModelProperty(value = "Revit族类型 ")
    @Column(name = "family_symbol")
    @JSONField(name = "BIMFamilySymbol",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var familySymbol: String? = null

    /** 设备序号 */
    @ApiModelProperty(value = "设备序号 ")
    @Column(name = "equip_serial")
    @JSONField(name = "EquipSerial",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var equipSerial: Double? = null

    /** 设备型号id */
    @ApiModelProperty(value = "设备型号id")
    @Column(name = "dp_specification_id")
    @JSONField(name = "DPSpecificationID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var dpSpecificationID: String? = null

    /** 品牌id */
    @ApiModelProperty(value = "品牌id")
    @Column(name = "dp_brand_id")
    @JSONField(name = "DPBrandID",serialzeFeatures = [SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty])
    var dpBrandID: String? = null

    /** 系统id集合 */
    @ApiModelProperty(value = "系统id集合")
    @JSONField(name = "SystemList")
    var systemList: List<String>? = null

    /** 对象类型 */
    @ApiModelProperty(value = "对象类型")
    @Column(name = "object_type")
    @JSONField(name = "ObjectType")
    override var objectType: String? = "Equipment"

    /** 项目自定义类型 */
    @ApiModelProperty(value = "项目自定义类型")
    @Column(name = "custom_category")
    @JSONField(name = "CustomCategory")
    var customCategory: String? = null

    /** 任务状态 待验证1、已验证0、未找到-1  */
    @ApiModelProperty(value = "任务状态-待验证1、已验证0、未找到-1")
    @Column(name = "task_state")
    @JSONField(name = "TaskState")
    var taskState: Int? = null

    /** 模型文件id */
    @ApiModelProperty(value = "模型文件id")
    @Column(name = "model_id")
    @JSONField(name = "ModelId")
    var modelId: String? = null

    /** 撕码贴码状态 */
    @ApiModelProperty(value = "撕码贴码状态")
    @Column(name = "code_type")
    @JSONField(name = "CodeType")
    var codeType: Int? = null

} // Class Equipment