package com.persagy.server.models

import com.alibaba.fastjson.annotation.JSONField
import com.persagy.server.datacenter.models.entities.objects.Equipment
import com.persagy.service.models.annotations.SCascade
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Table


@ApiModel(description = "设备信息实体类")
@Table(name = "equipment")
class ComponentCascade : Equipment() {
    /** 级联部件所属设备 */
    @ApiModelProperty(value = "级联部件所属设备")
    @SCascade(table="equipment", idColumn="id", childIdColumn="parent_id")
    @JSONField(name = "BelongedEquipment")
    var belongedEquipment: Equipment? = null
}