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

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

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.util.*
import javax.persistence.Column
import javax.persistence.Table

/**
 * 照明分区信息实体类
 *
 * @author  张维新
 */
@ApiModel(description = "照明分区信息实体类")
@Table(name = "zone_lighting")
open class ZoneLighting : ZoneSpaceBaseTable() {

    /** BIM模型中坐标 */
    @ApiModelProperty(value = "BIM模型中坐标")
    @Column(name = "bim_location")
    @JSONField(name = "BIMLocation")
    var bimLocation: 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 = "intro")
    @JSONField(name = "Intro")
    var intro: String? = null

    /** 设计照明功率 */
    @ApiModelProperty(value = "设计照明功率")
    @Column(name = "rated_lightp")
    @JSONField(name = "RatedLightP")
    var ratedLightP: String? = null

    /** 内外区类型 */
    @ApiModelProperty(value = "内外区类型")
    @Column(name = "zone_type")
    @JSONField(name = "ZoneType")
    var zoneType: String? = null

    /** 运行参数 */
    @ApiModelProperty(value = "运行参数")
    @Column(name = "run_param")
    @JSONField(name = "RunParam")
    var runParam: HashMap<String, Any?>? = null

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

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

    /** 图片  */
//    @ApiModelProperty(value = "图片 ")
//    @Column(name = "pic")
//    @JSONField(name = "Pic")
//    var pic: ArrayList<AttPic>? =null

    /** 空间序号  */
    @ApiModelProperty(value = "空间序号 ")
    @Column(name = "room_serial")
    @JSONField(name = "RoomSerial")
    var roomSerial: Double? =null

    /** 项目空间功能区类型  */
    @ApiModelProperty(value = "项目空间功能区类型 ")
    @Column(name = "proj_room_func_type")
    @JSONField(name = "ProjRoomFuncType")
    var projRoomFuncType: String? =null

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

    /** 级联-元空间 */
    @ApiModelProperty(value = "级联-元空间")
    @SCascade(table="r_sp_in_si_zone_lighting", idColumn="space_id", childIdColumn="ispace_id")
    @JSONField(name = "ZoneIspace")
    var zoneIspace: ArrayList<ZoneIspace>? = null

    /** 级联-系统 */
    @ApiModelProperty(value = "级联-系统")
    @SCascade(table="r_sy_in_sp_zone_lighting", idColumn="space_id", childIdColumn="sys_id")
    @JSONField(name = "GeneralSystem")
    var generalSystem: ArrayList<GeneralSystem>? = null

    /** 级联-服务于空间的设备 */
    @ApiModelProperty(value = "级联-服务于空间的设备")
    @SCascade(table="r_eq_for_sp_zone_lighting", idColumn="space_id", childIdColumn="equip_id")
    @JSONField(name = "EquipmentFor")
    var equipmentFor: ArrayList<Equipment>? = null

} // Class ZoneLighting