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

import com.alibaba.fastjson.annotation.JSONField
import com.fasterxml.jackson.annotation.JsonProperty
import com.sybotan.service.models.SBaseEntity
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id

/**
 *
 *
 * @author jxing
 */
open class BaseComponent : SBaseEntity(){

    /** 模型id */
    @ApiModelProperty(value = "模型id")
    @Column(name = "id", updatable = false)
    @Id
    var id: String? = null

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

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

    @ApiModelProperty(value = "revit模型中的id, 自增序列, 仅在解析模型内部对象关系时使用")
    @Column(name = "revit_id")
    @JSONField(name = "Id")
    @JsonProperty("Id")
    var revitId : String? = null

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

    /** 模型所属楼层的id, 是uuid */
    @ApiModelProperty(value = "模型所属楼层的id, 是uuid")
    @JsonProperty("ModelFloorId")
    @JSONField(name = "ModelFloorId")
    var modelFloorId: String? = null
}