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

package cn.sagacloud.server.algorithm.models.entities

import cn.sagacloud.server.algorithm.models.jsonAnalyzer.Location
import cn.sagacloud.server.algorithm.models.jsonAnalyzer.Parameter
import cn.sagacloud.server.algorithm.models.jsonAnalyzer.Point
import com.alibaba.fastjson.annotation.JSONField
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.sybotan.service.models.SBaseEntity
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table
/**
 * 设备
 *
 * @author jxing
 */
@ApiModel(description = "设备")
@Table(name = "revit.equipment")
@JsonIgnoreProperties(ignoreUnknown = true)
class Equipment : BaseComponent(){

    /** 名称 */
    @ApiModelProperty(value = "名称")
    @Column(name = "name")
    @JsonProperty("Name")
    var name: String? = null

    /** 补充信息 */
    @ApiModelProperty(value = "补充信息")
    @Column(name = "tag")
    @JsonProperty("Tag")
    var tag: String? = null

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

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

    /** 4位部件类型编码 */
    @ApiModelProperty(value = "4位部件类型编码")
    @Column(name = "family")
    @JSONField(name = "Family")
    @JsonProperty("Family")
    var family: String? = null
    set(value) {
        field = value?.trim()
    }


    /** 类型中文名称 */
    @ApiModelProperty(value = "类型中文名称")
    @Column(name = "family_name")
    @JSONField(name = "FamilyName")
    @JsonProperty("FamilyName")
    var familyName: String? = null

    /** 族符号 */
    @ApiModelProperty(value = "族符号")
    @Column(name = "family_symbol")
    @JSONField(name = "FamilySymbol")
    @JsonProperty("FamilySymbol")
    var familySymbol: String? = null

    /** 定位点 */
    @ApiModelProperty(value = "定位点")
    @Column(name = "location")
    @JsonProperty("Location")
    var location: Location? = null

    /** 设备轮廓 */
    @ApiModelProperty(value = "设备轮廓")
    @Column(name = "outline")
    @JsonProperty("OutLine")
    var outline : ArrayList<ArrayList<Point>>? = null

    /** 参数列表 */
    @ApiModelProperty(value = "参数列表")
    @Column(name = "parameters")
    @JSONField(name = "Parameters")
    @JsonProperty("Parameters")
    var parameters: ArrayList<Parameter>? = null

    /** 旋转角度 */
    @ApiModelProperty(value = "旋转角度")
    @Column(name = "rotation")
    @JSONField(name = "Rotation")
    @JsonProperty("Rotation")
    var rotation: Double? = null

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

    /** BIMID */
    @ApiModelProperty(value = "BIMID")
    @Column(name = "bimid")
    @JSONField(name = "BimId")
    @JsonProperty("BimId")
    var bimId: String? = null


    /** 万达BIMTypeID */
    @ApiModelProperty(value = "万达BIMTypeID")
    @Column(name = "bim_type_id")
    @JSONField(name = "BIMTypeID")
    @JsonProperty("BIMTypeID")
    var bimTypeID: String? = null

    /** 系统分类 */
    @ApiModelProperty(value = "系统分类")
    @Column(name = "sys_name")
    @JSONField(name = "SysName")
    @JsonProperty("SysName")
    var sysName: String? = null


    /** 初始4位部件类型编码 */
    @ApiModelProperty(value = "初始4位部件类型编码")
    @Column(name = "init_family")
    @JSONField(name = "InitFamily")
    @JsonProperty("InitFamily")
    var initFamily: String? = null

    /** 转换后的信息点 */
    @ApiModelProperty(value = "转换后的信息点")
    @Column(name = "infos")
    var infos: Map<String,String>? = null
}