/*
 * ********************************************************************************************************************
 *
 *                     :*$@@%$*:                         ;:                ;;    ;;
 *                   :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
 *                  :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
 *                  =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
 *                  =@*                                  %!              @ $= % %@=   =%@!      %=
 *             *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
 *           %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
 *         ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
 *         $@*   ;@@@%=!:                *@*
 *         =@$    ;;;!=%@@@@=!           =@!
 *          %@$:      =@%: :*@@@*       %@=                    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 = "property")
open class RelPropertyShaft : BaseInfo() {

    /** 资产id */
    @ApiModelProperty(value = "资产id", required = true)
    @Id
    @Column(name = "id")
    @JSONField(name = "Id")
    var id: String? = null

    /** 资产名称 */
    @ApiModelProperty(value = "资产名称", required = true)
    @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

    /** 设计图纸中编码 */
    @ApiModelProperty(value = "设计图纸中编码")
    @Column(name = "cad_id")
    @JSONField(name = "CADID")
    var cadId: String? = null

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

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

    /** 资产类型code */
    @ApiModelProperty(value = "资产类型code")
    @Column(name = "family")
    @JSONField(name = "Family")
    var family: 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

    /** 资产关联设备id */
    @ApiModelProperty(value = "关联的设备或部件")
    @Column(name = "equip_id")
    @JSONField(name = "EquipmentId")
    var equipId: String? = null

//    /** 级联-资产所在的空间的 */
//    @ApiModelProperty(value = "级联-设备所在的空间的")
//    @SCascade(table="r_pe_in_sp_base", idColumn="equip_id", childIdColumn="space_id")
//    @JSONField(name = "ObjectInfo")
//    var objectInfo: ArrayList<RelZoneSpace>? = null

    /** 级联-资产所在的竖井 */
    @ApiModelProperty(value = "级联-资产所在的竖井")
    @SCascade(table="r_pe_in_sh", idColumn="equip_id", childIdColumn="shaft_id")
    @JSONField(name = "ObjectInfo")
    var objectInfo: ArrayList<RelShaft>? = null


} // Class Property








