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 com.persagy.service.models.SBaseEntity
import io.swagger.v3.oas.annotations.media.Schema
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 *
 *
 * @author jxing
 */
@Schema(description = "轮廓线段")
@Table(name = "revit.boundary_segment")
@JsonIgnoreProperties(ignoreUnknown = true)
class BoundarySegment : SBaseEntity() {
    /** id */
   @Schema(description = "id")
    @Column(name = "id", updatable = false)
    @Id
    var id: String? = null

    /** 模型id(外键) */
   @Schema(description = "模型id(外键)")
    @Column(name = "model_id")
    @JSONField(serialize = false)
    var modelId: String? = null

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

    /** 所属对象的类型(wall, virtual_wall, column)门窗待定 */
   @Schema(description = "所属对象的类型(wall, virtual_wall, column) 门窗待定")
    @Column(name = "belong_type")
    @JSONField(serialize = false)
    var belongType: String? = null

    /** 描点 */
   @Schema(description = "描点")
    @Column(name = "curve")
    @JSONField(name = "Curve")
    @JsonProperty("Curve")
    var curve: ArrayList<Point>? = null

    /** 轮廓所连接的空间id */
   @Schema(description = "轮廓所连接的空间id")
    @Column(name = "space_id")
    @JSONField(serialize = false)
    var spaceId: String? = null

    /** 空间的轮廓线断的大组的索引 */
   @Schema(description = "空间的轮廓线断的大组的索引")
    @Column(name = "group_index")
    @JSONField(serialize = false)
    var groupIndex: Int? = null

    /** 轮廓在大组内的顺序 */
   @Schema(description = "轮廓在大组内的顺序")
    @Column(name = "sequence")
    @JSONField(serialize = false)
    var sequence: Int? = null

    /** 线段关联实体构件Id,可以为空, 指向墙id, 虚拟墙id, 柱子id(可能门窗id) */
   @Schema(description = "线段关联实体构件Id,可以为空, 指向墙id, 虚拟墙id, 柱子id(可能门窗id)")
    @Column(name = "reference")
    @JSONField(name = "Reference")
    @JsonProperty("Reference")
    var reference: String? = null

   @Schema(description = "revit模型中的id")
    @Column(name = "revit_id")
    @JSONField(name = "Id")
    @JsonProperty("Id")
    var revitId : String? = null

    @JSONField(name = "ElementType")
   @Schema(description = "类型")
    @Column(name = "type")
    @JsonProperty("ElementType")
    var elementType : String? = null
}









