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

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.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

@ApiModel(description = "虚拟墙")
@Table(name = "graphtype.virtual_wall")
@JsonIgnoreProperties(ignoreUnknown = true)
class MVirtualWall : SBaseEntity(){

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

    /** 墙路径 */
    @ApiModelProperty(value = "墙路径")
    @Column(name = "location")
    @JSONField(name = "Location")
    @JsonProperty("Location")
    var location : MLocation? = null

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

    /** 墙轮廓 */
    @ApiModelProperty(value = "墙轮廓")
    @Column(name = "outline")
    @JSONField(name = "OutLine")
    @JsonProperty("OutLine")
    var outline: ArrayList<ArrayList<MPoint>>? = null

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

    /** 模型id(外键) */
    @ApiModelProperty(value = "模型id(外键)")
    @Column(name = "model_id")
    @JSONField(name = "ModelId")
    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 = "RevitId")
    @JsonProperty("RevitId")
    var revitId : String? = null

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