package cn.sagacloud.server.datacenter.models.response

import cn.sagacloud.server.datacenter.models.entities.Equipment
import cn.sagacloud.server.datacenter.models.entities.ExplainAllCategories
import cn.sagacloud.server.datacenter.models.entities.GeneralSystem
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.Table


/**
 * 查询设备相关联的信息应答类
 *
 * @author
 */
@ApiModel(description = "查询设备相关联的信息应答类")
@Table(name = "v_equip_property_count")
class EquipAssetComponentsReqponse : Equipment() {

    /** 资产id */
    @ApiModelProperty(value = "资产id")
    @Column(name = "link_id")
    @JSONField(name ="LinkId")
    var linkId: String? = null

    /** 资产名称 */
    @ApiModelProperty(value = "资产名称")
    @Column(name = "link_name")
    @JSONField(name ="LinkEquipName")
    var linkEquipName: String? = null

    /** 资产本地名称 */
    @ApiModelProperty(value = "资产本地名称")
    @Column(name = "link_local_name")
    @JSONField(name ="LinkEquipLocalName")
    var linkEquipLocalName: String? = null

    /** 资产分类 */
    @ApiModelProperty(value = "资产分类")
    @Column(name = "link_family")
    @JSONField(name ="LinkFamily")
    var linkFamily: String? = null

    /** 系统对象 */
    @ApiModelProperty(value = "系统对象")
    @JSONField(name ="LinkSystem")
    var linkSystem: List<GeneralSystem>? = null

    /** 部件数量 */
    @ApiModelProperty(value = "部件数量")
    @JSONField(name ="Count")
    var count: Int = 0

    /** 级联-部件   table  对应关系表   idColumn 对应 本类的id    childIdColumn 级联对象的关系id */
    @ApiModelProperty(value = "级联-是否有部件")
    @SCascade(table="equipment", idColumn="category", childIdColumn="parent_id")
    @JSONField(name = "ComponentCategory")
    var componentCategory: ArrayList<ExplainAllCategories>? = null
} // Class EquipAssetComponentsReqponse