package com.persagy.server.models

import com.alibaba.fastjson.annotation.JSONField
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.Table

/**
 * 部件关联的资产
 *
 * @author 张维新
 */
@ApiModel(description = "部件关联的资产")
@Table(name = "v_component_property")
class ComponentProperty : BaseInfo(){

    /** 部件id */
    @ApiModelProperty(value = "部件id",required = true)
    @Column(name = "id")
    @JSONField(name = "EquipID")
    var id: String? = null

    /** 部件名称 */
    @ApiModelProperty(value = "部件名称",required = true)
    @Column(name = "name")
    @JSONField(name = "EquipName")
    var name: String? = null

    /** 部件本地编码 */
    @ApiModelProperty(value = "部件本地编码")
    @Column(name = "local_id")
    @JSONField(name = "EquipLocalID")
    var localId: String? = null

    /** 部件本地名称 */
    @ApiModelProperty(value = "部件本地名称")
    @Column(name = "local_name")
    @JSONField(name = "EquipLocalName")
    var localName: String? = null

    /** 部件二维码照片 */
    @ApiModelProperty(value = "部件二维码照片")
    @Column(name = "qr_code")
    @JSONField(name = "EquipQRCode")
    var qrCode: String? = null

    /** 设计图纸中编码 */
    @ApiModelProperty(value = "设计图纸中编码")
    @Column(name = "cad_id")
    @JSONField(name = "CADID")
    var cadId: String? = null

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

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

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

    /** 部件类型code */
    @ApiModelProperty(value = "部件类型code")
    @Column(name = "category")
    @JSONField(name = "Category")
    var category: String? = null

    /** 部件所在建筑id */
    @ApiModelProperty(value = "部件所在建筑id")
    @Column(name = "building_id")
    @JSONField(name = "BuildingId")
    var buildingId: String? = null

    /** 部件所在楼层id */
    @ApiModelProperty(value = "部件所在楼层id")
    @Column(name = "floor_id")
    @JSONField(name = "FloorId")
    var floorId: String? = null

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

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

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

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

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

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

//    /** 部件关联的资产id */
//    @ApiModelProperty(value = "部件关联的资产id")
//    @Column(name = "link_id")
//    @JSONField(name = "LinkId")
//    var linkId: String? = null

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

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

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

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

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

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

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

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

    /** 资产名称 */
    @ApiModelProperty(value = "资产名称")
    @Column(name = "property_name")
    @JSONField(name = "PropertyName")
    var propertyName: String? = null

    /** 资产本地名称 */
    @ApiModelProperty(value = "资产本地名称")
    @Column(name = "property_local_name")
    @JSONField(name = "PropertyLocalName")
    var propertyLocalName: String? = null

    /** 资产id */
    @ApiModelProperty(value = "资产id")
    @Column(name = "property_id")
    @JSONField(name = "PropertyId")
    var propertyId: String? = null

} // Class ComponentProperty