package com.persagy.server.datacenter.models.entities.objects

import com.alibaba.fastjson.annotation.JSONField
import com.persagy.server.datacenter.models.entities.base.BaseInfo
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 = "tenant_statis")
class TenantWithCount : BaseInfo() {

    /** 租户id */
    @ApiModelProperty(value = "租户id")
    @Id
    @Column(name = "id")
    @JSONField(name = "TenantID")
    var id: String? = null

    /** 租户名称 */
    @ApiModelProperty(value = "租户名称")
    @Column(name = "name")
    @JSONField(name = "TenantName")
    var name: String? = null

    /** 租户本地编码 */
    @ApiModelProperty(value = "租户本地编码")
    @Column(name = "local_id")
    @JSONField(name = "TenantLocalID")
    var localId: String? = null

    /** 租户本地名称 */
    @ApiModelProperty(value = "租户本地名称")
    @Column(name = "local_name")
    @JSONField(name = "TenantLocalName")
    var localName: String? = null

    /** 租户本地编码2 */
    @ApiModelProperty(value = "租户本地编码2")
    @Column(name = "local_id2")
    @JSONField(name = "TenantLocalID2")
    var localId2: String? = null

    /** 租户本地名称2 */
    @ApiModelProperty(value = "租户本地名称2")
    @Column(name = "local_name2")
    @JSONField(name = "TenantLocalName2")
    var localName2: 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 = "room_id")
    @JSONField(name = "RoomID")
    var roomId:  String? = null

    /** 房间数 */
    @ApiModelProperty(value = "房间数")
    @Column(name = "room_count")
    @JSONField(name = "RoomCount")
    var roomCount: Long = 0

    /** 租赁信息 */
    @ApiModelProperty(value = "租赁信息")
    @Column(name = "lease_info")
    @JSONField(name = "LeaseInfo")
    var leaseInfo: HashMap<String,Any?>? = null

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

} // Class Tenant