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.window")
@JsonIgnoreProperties(ignoreUnknown = true)
class MWindow : SBaseEntity(){

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

    /** 模型所属楼层的id, 是uuid */
    @ApiModelProperty(value = "模型所属楼层的id, 是uuid")
    @Column(name = "model_floor_id")
    @JsonProperty("ModelFloorId")
    @JSONField(name = "ModelFloorId")
    var modelFloorId: 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

    /** 所属墙 */
    @ApiModelProperty(value = "所属墙")
    @Column(name = "wall_id")
    @JSONField(name = "WallId")
    var wallId: String? = null

    /** 拥有者的RevitId */
    @ApiModelProperty(value = "拥有者的RevitId")
    @Column(name = "owner")
    @JSONField(name = "Owner")
    @JsonProperty("Owner")
    var owner: String? = null

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

    /** 宽度 */
    @ApiModelProperty(value = "宽度")
    @Column(name = "width")
    @JSONField(name = "Width")
    var width: Double? = null

    /** 定位点 */
    @ApiModelProperty(value = "定位点")
    @Column(name = "location")
    @JSONField(name = "Location")
    @JsonProperty("Location")
    var location: MLocation? = null

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

    /** 类型中文名称 */
    @ApiModelProperty(value = "类型中文名称")
    @Column(name = "family_name")
    @JSONField(name = "FamilyName")
    @JsonProperty("FamilyName")
    var familyName: String? = null

    /** 族符号 */
    @ApiModelProperty(value = "族符号")
    @Column(name = "family_symbol")
    @JSONField(name = "FamilySymbol")
    @JsonProperty("FamilySymbol")
    var familySymbol: String? = null

    @JSONField(name = "Thick")
    @ApiModelProperty(value = "厚度")
    @Column(name = "thick")
    @JsonProperty("Thick")
    var thick : Double? = null

} // Class MWindow