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

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

import cn.sagacloud.server.datacenter.models.entities.base.BaseInfo
import cn.sagacloud.server.datacenter.models.entities.task.TaskPic
import com.alibaba.fastjson.annotation.JSONField
import com.sybotan.service.models.annotations.SCascade
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.io.Serializable
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 业务空间
 *
 * @author  张维新
 */
@ApiModel(description = "空间实体类")
@Table(name = "zone_space_base")
open class RelZoneSpaceAirMixing: Serializable, BaseInfo() {

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

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

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

    /** 空间本地名称 */
    @ApiModelProperty(value = "空间本地名称")
    @Column(name = "local_name")
    @JSONField(name = "LocalName")
    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

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

//    /** 级联-建筑 */
//    @ApiModelProperty(value = "级联-建筑")
//    @SCascade(table="zone_space_base", idColumn="id", childIdColumn="building_id")
//    @JSONField(name = "Building")
//    var building: Building? = null
//
//
//    /** 级联-楼层  */
//    @ApiModelProperty(value = "级联-楼层")
//    @SCascade(table="zone_space_base", idColumn="id", childIdColumn="floor_id")
//    @JSONField(name = "Floor")
//    var floor: Floor? = null
//
//    /** 级联-空间类型  */
//    @ApiModelProperty(value = "级联-空间类型")
//    @SCascade(table="zone_space_base", idColumn="id", childIdColumn="object_type")
//    @JSONField(name = "DClassDef")
//    var zoneName: DClassDef? = null
//
//    /** 级联-建筑 */
//    @ApiModelProperty(value = "级联-建筑")
//    @SCascade(table="r_sp_in_bd", idColumn="space_id", childIdColumn="building_id")
//    @JSONField(name = "BuildingList")
//    var buildingList: ArrayList<Building>? = null
//
//    /** 级联-楼层  */
//    @ApiModelProperty(value = "级联-楼层")
//    @SCascade(table="r_sp_in_fl", idColumn="space_id", childIdColumn="floor_id")
//    @JSONField(name = "FloorList")
//    var floorlList: ArrayList<Floor>? = null

    /** 级联-资产所在的空间的 */
    @ApiModelProperty(value = "级联-设备所在的空间的")
    @SCascade(table="relationship.r_sp2sp", idColumn="id1", childIdColumn="id2",self = true,filter = "type = 'sp2sp_ConvectionNetwork_2'" )
    @JSONField(name = "ObjectInfo")
    var objectInfo: ArrayList<RelZoneSpace>? = null


} // Class ZoneAirConditioning