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

import cn.sagacloud.server.datacenter.models.entities.base.RBaseInfo
import com.alibaba.fastjson.annotation.JSONField
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 图 - graph
 *
 * @author 张维新
 */
@ApiModel(description = "图 - graph")
@Table(name = "topo.graph")
class Graph : RBaseInfo(){

    /** 图ID */
    @ApiModelProperty(value = "图ID")
    @Id
    @Column(name = "id")
    @JSONField(name = "Id")
    var id: String? = null

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

    /** 图名称 */
    @ApiModelProperty(value = "图名称")
    @Column(name = "name")
    @JSONField(name = "Name")
    var name: String? = null

    /** 类型 */
    @ApiModelProperty(value = "类型")
    @Column(name = "type")
    @JSONField(name = "Type")
    var type: String? = null

    @ApiModelProperty(value = "节点")
    @JSONField(name = "NodeList")
    var nodeList: ArrayList<Item>? = null

    @ApiModelProperty(value = "关系")
    @JSONField(name = "RelationList")
    var relationList: ArrayList<TopoRelation>? = null


} // Class Graph