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

import cn.sagacloud.server.algorithm.models.entities.BaseComponent
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.persagy.server.datacenter.models.entities.graphtype.MPoint
import javax.persistence.Column
import javax.persistence.Table

/**
 *
 *
 * @author jxing
 */
@Table(name = "revit.connector")
@JsonIgnoreProperties(ignoreUnknown = true)
class Connector : BaseComponent(),Cloneable{

    /** 所属对象的id */
    @Column(name = "belong")
//    @JSONField(serialize = false)
    var belong: String? = null

    /** 所属对象的类型(pipe, duct, others, equipment, component) */
    @Column(name = "belong_type")
//    @JSONField(serialize = false)
    var belongType: String? = null

//    /** 对应Revit模型id */
//    @ApiModelProperty(value = "对应Revit模型id")
//    @Column(name = "source_id")
//    @JSONField(name = "SourceId")
//    @JsonProperty("SourceId")
//    var sourceId: String? = null

    /** 所属域 */
    @Column(name = "domain")
//    @JSONField(name = "domain")
//    @JsonProperty("domain")
    var domain: String? = null

    /** 位置信息 */
    @Column(name = "origin")
//    @JSONField(name = "origin")
//    @JsonProperty("origin")
    var origin: MPoint? = null

    /** 描述 */
    @Column(name = "description")
//    @JSONField(name = "description")
//    @JsonProperty("description")
    var description: String? = null

    /** 是否连接其他连接件 */
    @Column(name = "connected")
//    @JSONField(name = "isConnected")
//    @JsonProperty("isConnected")
    var isConnected: Boolean? = null

    /** 所属对象的revit_id */
    @Column(name = "owner")
//    @JSONField(name = "owner")
//    @JsonProperty("owner")
    var owner: String? = null

    /** 连接的连接件id */
    @Column(name = "connected_ids")
//    @JSONField(name = "connectedIds")
//    @JsonProperty("connectedIds")
    var connectedIds: ArrayList<String>? = null

    /** 管道系统类型名称 */
    @Column(name = "mep_system_type")
//    @JSONField(name = "mepSystemTypeName")
//    @JsonProperty("mepSystemTypeName")
    var mepSystemType: String? = null

//    /** 连接件连接的连接件id */
//    @ApiModelProperty(value = "连接件连接的连接件id")
//    @Column(name = "connect_id")
//    @JSONField(name = "ConnectId")
//    @JsonProperty("ConnectId")
//    var connectId: String? = null

    /** 连接件连接的连接件id */
    @Column(name = "connect_id_json")
//    @JSONField(name = "connectId")
//    @JsonProperty("connectId")
    var connectIdJson: ArrayList<String>? = null

    var isUsed: Boolean? = null

    /** 所属BIMID */
    @Column(name = "belong_bimid")
//    @JSONField(name = "belongBimId")
//    @JsonProperty("belongBimId")
    var belongBimId: String? = null

    @Override
    public override fun clone(): Connector {
        return super.clone() as Connector
    }


}