package com.persagy.labsl.models.entities.tpt

import com.persagy.labsl.models.entities.tpt.Pos
import com.persagy.service.models.SBaseEntity
import io.swagger.v3.oas.annotations.media.Schema
import java.io.Serializable
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 锚点
 *
 * @author wx
 */
@Schema(description = "锚点")
@Table(name = "labsl.anchor")
open class Anchor : SBaseEntity(), Serializable {

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

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

    /** 图id */
    @Schema(description = "图id")
    @Id
    @Column(name = "graph_id")
    var graphId: String? = null

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

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

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

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

} // Class Anchor