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

package com.persagy.server.models

import com.persagy.server.datacenter.models.entities.base.BaseInfo
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")
open class EquipmentProSy : BaseInfo() {

    /** 设备id */
    @ApiModelProperty(value = "设备id",required = true)
    @Id
    @Column(name = "id")
    var id: String? = null

    /** 设备名称 */
    @ApiModelProperty(value = "设备名称",required = true)
    @Column(name = "name")
    var name: String? = null

    /** 设备本地编码 */
    @ApiModelProperty(value = "设备本地编码")
    @Column(name = "local_id")
    var localId: String? = null

    /** 设备本地名称 */
    @ApiModelProperty(value = "设备本地名称")
    @Column(name = "local_name")
    var localName: String? = null

    /** 二维码图片 */
    @ApiModelProperty(value = "二维码图片")
    @Column(name = "qr_code_pic")
    var qRCodePic: String? = null

    /** 二维码内容 */
    @ApiModelProperty(value = "二维码内容")
    @Column(name = "default_qr_code")
    var defaultQRCode: String? = null

    /** RFID标识 */
    @ApiModelProperty(value = "RFID标识")
    @Column(name = "rf_id")
    var rfId: String? = null

    /** BIM模型中编码 */
    @ApiModelProperty(value = "BIM模型中编码")
    @Column(name = "bim_id")
    var bimId: String? = null

    /** BIM构建编码 */
    @ApiModelProperty(value = "BIM构建编码")
    @Column(name = "bim_type_id")
    var bimTypeId: String? = null

    /** BIM模型中坐标 */
    @ApiModelProperty(value = "BIM模型中坐标")
    @Column(name = "bim_location")
    var bimLocation: String? = null

    /** 项目id */
    @ApiModelProperty(value = "项目id",required = true)
    @Column(name = "project_id")
    var projectId: String? = null

    /** 设备类型code */
    @ApiModelProperty(value = "设备类型code")
    @Column(name = "class_code")
    var classCode: String? = null

    /** 设备所在建筑id */
    @ApiModelProperty(value = "设备所在建筑id")
    @Column(name = "building_id")
    var buildingId: String? = null

    /** 设备所在楼层id */
    @ApiModelProperty(value = "设备所在楼层id")
    @Column(name = "floor_id")
    var floorId: String? = null

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

    /** 品牌型号id */
    @ApiModelProperty(value = "品牌型号id")
    @Column(name = "dp_manufacturer_id")
    var dpManufacturerID: String? = null

    /** 供应商信息id */
    @ApiModelProperty(value = "供应商信息id")
    @Column(name = "dp_supplier_id")
    var dpSupplierID: String? = null

    /** 维修商信息id */
    @ApiModelProperty(value = "维修商信息id")
    @Column(name = "dp_maintainer_id")
    var dpMaintainerID: String? = null

    /** 保险公司信息id */
    @ApiModelProperty(value = "保险公司信息id")
    @Column(name = "dp_insurer_id")
    var dpInsurerID: String? = null

    /** 设备型号id */
    @ApiModelProperty(value = "设备型号id")
    @Column(name = "dp_specification_id")
    var dpSpecificationID: String? = null

    /** 品牌id */
    @ApiModelProperty(value = "品牌id")
    @Column(name = "dp_brand_id")
    var dpBrandID: String? = null

    /** 台账参数 */
    @ApiModelProperty(value = "台账参数")
    @Column(name = "ledger_param")
    var ledgerParam: HashMap<String,Any?>? = null

    /** 通讯参数 */
    @ApiModelProperty(value = "通讯参数")
    @Column(name = "comm_param")
    var commParam: HashMap<String,Any?>? = null

    /** 技术参数 */
    @ApiModelProperty(value = "技术参数")
    @Column(name = "tech_param")
    var techParam: HashMap<String,Any?>? = null

    /** 运行参数 */
    @ApiModelProperty(value = "运行参数")
    @Column(name = "run_param")
    var runParam: HashMap<String,Any?>? = null

    /** 设定参数 */
    @ApiModelProperty(value = "设定参数")
    @Column(name = "setting_param")
    var settingParam: HashMap<String,Any?>? = null

    /** 报警信息 */
    @ApiModelProperty(value = "报警信息")
    @Column(name = "alram")
    var alram: HashMap<String,Any?>? = null

    /** 自定义 */
    @ApiModelProperty(value = "自定义")
    @Column(name = "custom_param")
    var customParam: HashMap<String,Any?>? = null

    /** 部件关联设备id */
    @ApiModelProperty(value = "部件关联设备id")
    @Column(name = "parent_id")
    var parentId: String? = null

    /** 温度传感器 */
    @ApiModelProperty(value = "温度传感器")
    @Column(name = "temp_sensor")
    var tempSensor: HashMap<String,Any?>? = null

    /** 技术参数-通用 */
    @ApiModelProperty(value = "技术参数-通用")
    @Column(name = "tech_param_general")
    var techParamGeneral: HashMap<String,Any?>? = null

    /** 运行参数-通用 */
    @ApiModelProperty(value = "运行参数-通用")
    @Column(name = "run_param_general")
    var runParamGeneral: HashMap<String,Any?>? = null

    /** 速度传感器 */
    @ApiModelProperty(value = "速度传感器")
    @Column(name = "speed_sensor")
    var speedSensor: HashMap<String,Any?>? = null

    /** 声音传感器 */
    @ApiModelProperty(value = "声音传感器")
    @Column(name = "sound_sensor")
    var soundSensor: HashMap<String,Any?>? = null

    /** 湿度传感器 */
    @ApiModelProperty(value = "湿度传感器")
    @Column(name = "humidity_sensor")
    var humiditySensor: HashMap<String,Any?>? = null

    /** 压力传感器 */
    @ApiModelProperty(value = "压力传感器")
    @Column(name = "press_transd")
    var pressTransd: HashMap<String,Any?>? = null

    /** 热量传感器 */
    @ApiModelProperty(value = "热量传感器")
    @Column(name = "heat_sensor")
    var heatSensor: HashMap<String,Any?>? = null

    /** 流量传感器 */
    @ApiModelProperty(value = "流量传感器")
    @Column(name = "flow_sensor")
    var flowSensor: HashMap<String,Any?>? = null

    /** 电度传感器 */
    @ApiModelProperty(value = "电度传感器")
    @Column(name = "electricity_sensor")
    var electricitySensor: HashMap<String,Any?>? = null

    /** 位移传感器 */
    @ApiModelProperty(value = "位移传感器")
    @Column(name = "displ_sensor")
    var displSensor: HashMap<String,Any?>? = null

    /** 浓度传感器 */
    @ApiModelProperty(value = "浓度传感器")
    @Column(name = "concent_sensor")
    var concentSensor: HashMap<String,Any?>? = null

    /** 图像传感器 */
    @ApiModelProperty(value = "图像传感器")
    @Column(name = "image_sensor")
    var imageSensor: HashMap<String,Any?>? = null

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

    /** 反馈参数 */
    @ApiModelProperty(value = "反馈参数")
    @Column(name = "feedback_param")
    var feedbackParam: HashMap<String,Any?>? = null

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

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

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

    /** Revit族 */
    @ApiModelProperty(value = "Revit族 ")
    @Column(name = "family_name")
    var familyName: String? = null

    /** Revit族类型 */
    @ApiModelProperty(value = "Revit族类型 ")
    @Column(name = "family_symbol")
    var familySymbol: String? = null

    /** 设备序号 */
    @ApiModelProperty(value = "设备序号 ")
    @Column(name = "equip_serial")
    var equipSerial: String? = null

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

}