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

package com.persagy.server.datacenter.models.entities

import cn.sagacloud.server.algorithm.models.entities.BaseComponent
import com.alibaba.fastjson.annotation.JSONField
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.persagy.server.datacenter.models.entities.graphtype.MLocation
import com.persagy.server.datacenter.models.entities.graphtype.MPoint
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table
/**
 * 设备
 *
 * @author jxing
 */
@Table(name = "revit.equipment")
@JsonIgnoreProperties(ignoreUnknown = true)
class Equipment : BaseComponent(){

    /** 名称 */

    @Column(name = "name")
    var name: String? = null

    /** 补充信息 */

    @Column(name = "tag")
    var tag: String? = null

    /** 本地编码 */

    @Column(name = "local_id")
    var localId: String? = null

    /** 本地名称 */

    @Column(name = "local_name")
    var localName: String? = null

    /** 4位部件类型编码 */

    @Column(name = "family")
    var family: String? = null
    set(value) {
        field = value?.trim()
    }


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

    /** 族符号 */
    @Column(name = "family_symbol")
    var familySymbol: String? = null

    /** 定位点 */
    @Column(name = "location")
    var location: MLocation? = null

    /** 设备轮廓 */
    @Column(name = "outline")
    var outline : ArrayList<ArrayList<MPoint>>? = null

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

    /** 旋转角度 */
    @Column(name = "rotation")
    var rotation: Double? = null

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

    /** BIMID */
    @Column(name = "bimid")
    var bimId: String? = null


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

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


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

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