package com.persagy.labsl.domain

import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableName
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler
import com.github.jeffreyning.mybatisplus.anno.MppMultiId
import lombok.Data
import lombok.EqualsAndHashCode
import java.io.Serializable
import java.util.*

/**
 *
 * @TableName anchor
 */
@TableName(value = "anchor",autoResultMap = true)
@Data
@EqualsAndHashCode
class AnchorEntity : Serializable {
    /**
     * 全局id
     */
    @TableField(value = "id")
    @MppMultiId
    var id: String? = null
    /**
     * 图id
     */
    @MppMultiId
    @TableField(value = "graph_id")
    var graphId: String? = null
    /**
     * 锚点id
     */
    @MppMultiId
    @TableField(value = "anchor_id")
    var anchorId: String? = null
    /**
     * 图例节点
     */
    @TableField(value = "node_id")
    var nodeId: String? = null
    /**
     * 锚点的坐标
     */
    @TableField(value = "pos",typeHandler = JacksonTypeHandler::class)
    var pos: Any? = null
    /**
     * 项目id
     */
    @TableField(value = "project_id")
    var projectId: String? = null
    /**
     * 图状态（1一般，2待审核，3审核完成，4回收站 ,0发布）
     */
    @TableField(value = "state")
    var state: Int? = null
    /**
     * 更新时间
     */
    @TableField(value = "last_update")
    var lastUpdate: Date? = null
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    var createTime: Date? = null

    companion object {
        @TableField(exist = false)
        val serialVersionUID = 1L
    }
}