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
 */
@ApiModel(description = "锚点")
@Table(name = "labsl.anchor")
open class Anchor : SBaseEntity(), Serializable {

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

    /** 锚点id */
    @ApiModelProperty(value = "锚点id")
    @Id
    @Column(name = "anchor_id")
    var anchorId: String? = null

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

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

    /** 锚点的坐标 */
    @ApiModelProperty(value = "锚点的坐标")
    @Column(name = "pos")
    var pos: Pos? = null

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

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

} // Class Anchor