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

import cn.sagacloud.server.algorithm.models.jsonAnalyzer.Point
import com.alibaba.fastjson.annotation.JSONField
import com.fasterxml.jackson.annotation.JsonIgnore
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.boundary_segment")
@JsonIgnoreProperties(ignoreUnknown = true)
class BoundarySegment : SBaseEntity() {
    /** id */
    @ApiModelProperty(value = "id")
    @Column(name = "id", updatable = false)
    @Id
    var id: String? = null

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

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

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

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

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

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

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

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

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

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









