/*
 * ********************************************************************************************************************
 *
 *                     :*$@@%$*:                         ;:                ;;    ;;
 *                   :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
 *                  :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
 *                  =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
 *                  =@*                                  %!              @ $= % %@=   =%@!      %=
 *             *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
 *           %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
 *         ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
 *         $@*   ;@@@%=!:                *@*
 *         =@$    ;;;!=%@@@@=!           =@!
 *          %@$:      =@%: :*@@@*       %@=                    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 com.alibaba.fastjson.annotation.JSONField
import com.sybotan.service.models.annotations.SCascade
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 建筑信息实体类
 *
 * @author  张维新
 */
@ApiModel(description = "建筑信息实体类")
@Table(name = "building")
open class RelBuilding : 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

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

    /** 建筑信息 */
    @ApiModelProperty(value = "建筑信息")
    @Column(name = "building_info")
    @JSONField(name = "BuildingInfo")
    var buildingInfo: HashMap<String,Any?>? = null

    /** 工作历 */
    @ApiModelProperty(value = "工作历")
    @Column(name = "schedule")
    @JSONField(name = "Schedule")
    var schedule: 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 = "building_doc")
    @JSONField(name = "BuildingDoc")
    var buildingDoc: HashMap<String,Any?>? = null

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

//    /** 楼层   table  对应关系表   idColumn 对应 本类的关系id    childIdColumn 级联对象的关系id */
//    @ApiModelProperty(value = "级联-楼层")
//    @SCascade(table="floor", idColumn="building_id", childIdColumn="id")
//    @JSONField(name = "Floor")
//    var floor: ArrayList<Floor>? = null
//
//    /** 项目 */
//    @ApiModelProperty(value = "级联-项目")
//    @SCascade(table="building", idColumn="id", childIdColumn="project_id")
//    @JSONField(name = "Project")
//    var project: Project? = null


} // Class Building