/*
 * ********************************************************************************************************************
 *
 *                     :*$@@%$*:                         ;:                ;;    ;;
 *                   :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
 *                  :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
 *                  =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
 *                  =@*                                  %!              @ $= % %@=   =%@!      %=
 *             *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
 *           %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
 *         ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
 *         $@*   ;@@@%=!:                *@*
 *         =@$    ;;;!=%@@@@=!           =@!
 *          %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
 *           ;%@@$=$@@%*       *@@@$=%@@%;
 *              ::;::             ::;::                                              All rights reserved.
 *
 * ********************************************************************************************************************
 */

package cn.sagacloud.server.datacenter.models.entities

import cn.sagacloud.server.datacenter.models.entities.base.BaseInfo
import com.alibaba.fastjson.annotation.JSONField
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.util.*
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 元空间信息实体类
 *
 * @author  张维新
 */
@ApiModel(description = "元空间信息实体类")
@JsonIgnoreProperties(ignoreUnknown = true)
@Table(name = "zone_ispace")
open class ZoneIspace : BaseInfo() {

    /** 空间ID */
    @ApiModelProperty(value = "空间ID")
    @Id
    @Column(name = "id")
    @JSONField(name = "RoomID")
    var id: String? = null

    /** 空间名称 */
    @ApiModelProperty(value = "空间名称")
    @Column(name = "name")
    @JSONField(name = "RoomName")
    var name: String? = null

    /** 空间本地编码 */
    @ApiModelProperty(value = "空间本地编码")
    @Column(name = "local_id")
    @JSONField(name = "RoomLocalID")
    var localId: String? = null

    /** 空间本地名称 */
    @ApiModelProperty(value = "空间本地名称")
    @Column(name = "local_name")
    @JSONField(name = "RoomLocalName")
    var localName: String? = null

    /** 项目id */
    @ApiModelProperty(value = "项目id")
    @Column(name = "project_id")
    @JSONField(name = "ProjectId")
    var projectId: String? = null

    /** 建筑id */
    @ApiModelProperty(value = "建筑id")
    @Column(name = "building_id")
    @JSONField(name = "BuildingId")
    var buildingId: String? = null

    /** 楼层id */
    @ApiModelProperty(value = "楼层id")
    @Column(name = "floor_id")
    @JSONField(name = "FloorId")
    var floorId: String? = null

    /** 空间二维码图片 */
    @ApiModelProperty(value = "空间二维码图片")
    @Column(name = "qr_code")
    @JSONField(name = "RoomQRCode")
    var qrCode: String? = null

    /** BIM模型中编码 */
    @ApiModelProperty(value = "BIM模型中编码")
    @Column(name = "bim_id")
    @JSONField(name = "BIMID")
    var bimId: String? = null

    /** BIM模型中坐标 */
    @ApiModelProperty(value = "BIM模型中坐标")
    @Column(name = "bim_location")
    @JSONField(name = "BIMLocation")
    var bimLocation: String? = null

    /** 空间功能区类型 */
    @ApiModelProperty(value = "空间功能区类型")
    @Column(name = "func_type")
    @JSONField(name = "RoomFuncType")
    var funcType: String? = null

    /** 进深 */
    @ApiModelProperty(value = "进深")
    @Column(name = "depth")
    @JSONField(name = "Depth")
    var depth: Double? = null

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

    /** 建筑面积 */
    @ApiModelProperty(value = "建筑面积")
    @Column(name = "build_area")
    @JSONField(name = "BuildArea")
    var buildArea: Double? = null

    /** 使用面积 */
    @ApiModelProperty(value = "使用面积")
    @Column(name = "net_area")
    @JSONField(name = "NetArea")
    var netArea: Double? = null

    /** 高度 */
    @ApiModelProperty(value = "高度")
    @Column(name = "height")
    @JSONField(name = "Height")
    var height: Double? = null

    /** 配电容量 */
    @ApiModelProperty(value = "配电容量")
    @Column(name = "elec_cap")
    @JSONField(name = "ElecCap")
    var elecCap: Double? = null

    /** 污染等级 */
    @ApiModelProperty(value = "污染等级")
    @Column(name = "pollution_degree")
    @JSONField(name = "PollutionDegree")
    var pollutionDegree: String? = null

    /** 备注文字 */
    @ApiModelProperty(value = "备注文字")
    @Column(name = "intro")
    @JSONField(name = "Intro")
    var intro: String? = null

//    /** Revit族 */
//    @ApiModelProperty(value = "Revit族 ")
//    @Column(name = "family_name")
//    @JSONField(name = "FamilyName")
//    var familyName: String? = null
//
//    /** Revit族类型 */
//    @ApiModelProperty(value = "Revit族类型 ")
//    @Column(name = "family_symbol")
//    @JSONField(name = "FamilySymbol")
//    var familySymbol: String? = null

    /** 租户信息 */
    @ApiModelProperty(value = "租户信息")
    @Column(name = "tenant_info")
    @JSONField(name = "TenantInfo")
    var tenantInfo: HashMap<String, Any?>? = null

    /** 环境参数 */
    @ApiModelProperty(value = "租户信息")
    @Column(name = "env_param")
    @JSONField(name = "EnvParam")
    var envParam: HashMap<String, Any?>? = null

    /** 人员信息 */
    @ApiModelProperty(value = "人员信息")
    @Column(name = "people_info")
    @JSONField(name = "PeopleInfo")
    var peopleInfo: HashMap<String, Any?>? = null

    /** 能耗信息 */
    @ApiModelProperty(value = "能耗信息")
    @Column(name = "consumption_info")
    @JSONField(name = "ConsumptionInfo")
    var consumptionInfo: HashMap<String, Any?>? = null

    /** 自定义 */
    @ApiModelProperty(value = "自定义")
    @Column(name = "custom_param")
    @JSONField(name = "CustomParam")
    var customParam: HashMap<String,Any?>? = null

    @ApiModelProperty(value = "对象类型")
    @Column(name = "object_type")
    @JSONField(name = "ObjectType")
    override var objectType: String? = "Ispace"

    /** 模型文件id */
    @ApiModelProperty(value = "模型文件id")
    @Column(name = "model_id")
    @JSONField(name = "ModelId")
    var modelId: String? = null

    @ApiModelProperty(value = "轮廓线")
    @Column(name = "outline")
    @JSONField(name = "Outline")
    var outline: ArrayList<ArrayList<PointPosition>>? = null


//    /** 级联-设备 */
//    @ApiModelProperty(value = "级联-设备")
//    @SCascade(table="r_eq_in_sp_zone_tenant", idColumn="space_id", childIdColumn="equip_id")
//    @JSONField(name = "Equipment")
//    var equipment: ArrayList<Equipment>? = null

} // Class ZoneIspace