package com.persagy.revit.models.entities

import com.persagy.revit.models.jsonAnalyzer.Point
import com.alibaba.fastjson.annotation.JSONField
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.v3.oas.annotations.media.Schema
import javax.persistence.Column
import javax.persistence.Table

/**
 *
 *
 * @author jxing
 */
@Schema(description = "连接件")
@Table(name = "revit.connector")
@JsonIgnoreProperties(ignoreUnknown = true)
class Connector : BaseComponent(){

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

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

    /** 名称 */
   @Schema(description = "名称")
    @Column(name = "name")
    @JSONField(name = "Name")
    @JsonProperty("Name")
    var name: String? = null

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

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

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

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

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

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

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

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

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

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