package com.persagy.server.labsl.models.entities

import com.persagy.service.models.SBaseEntity
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.io.Serializable
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 图例节点与对象的关系
 *
 * @author  wx
 * @date  2020/9/17 16:35
 */
@ApiModel(description = "图例节点与对象的关系")
@Table(name = "labsl.attach_object_ids")
class AttachObjectIds : SBaseEntity(), Serializable {

    /** 全局id */
    @ApiModelProperty(value = "全局id")
    @Id
    @Column(name = "id")
    var id: String? = null

    /** 图例节点id */
    @ApiModelProperty(value = "图例节点id",required = true )
    @Id
    @Column(name = "node_id")
    var nodeId: String? = null

    /** 对象id */
    @ApiModelProperty(value = "对象id",required = true )
    @Id
    @Column(name = "object_id")
    var objectId: String? = null

    /** 图id */
    @ApiModelProperty(value = "图id")
    @Column(name = "graph_id")
    var graphId: String? = null

    /** 图状态（1一般，2待审核，3审核完成，0发布） */
    @ApiModelProperty(value = "图状态（1一般，2待审核，3审核完成，4回收站 ,0发布）")
    @Column(name = "state")
    var state: Int? = 1

} // Class AttachObjectIds