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 java.io.Serializable
import java.util.*

/**
 *
 * @TableName relation
 */
@TableName(value = "relation",autoResultMap = true)
@Data
class RelationEntity : Serializable {
    /**
     * 系统图对象id
     */
    @MppMultiId
    @TableField(value = "id")
    var id: String? = null
    /**
     * 关系id
     */
    @MppMultiId
    @TableField(value = "relation_id")
    var relationId: String? = null
    /**
     * 系统图 id
     */
    @MppMultiId
    @TableField(value = "graph_id")
    var graphId: String? = null
    /**
     * 关系名称
     */
    @TableField(value = "name")
    var name: String? = null
    /**
     * 图元id
     */
    @TableField(value = "graph_element_id")
    var graphElementId: String? = null
    /**
     * 关联节点1_id
     */
    @TableField(value = "node1_id")
    var node1Id: String? = null
    /**
     * 关联节点2_id
     */
    @TableField(value = "node2_id")
    var node2Id: String? = null
    /**
     * 关联锚点1_id
     */
    @TableField(value = "anchor1_id")
    var anchor1Id: String? = null
    /**
     * 关联锚点2_id
     */
    @TableField(value = "anchor2_id")
    var anchor2Id: String? = null
    /**
     * 方向（0:无向，1：节点1到节点2，2：节点2到节点1)
     */
    @TableField(value = "dir")
    var dir: Int? = null
    /**
     * 直线（Line），水平垂直
     */
    @TableField(value = "line_type")
    var lineType: String? = null
    /**
     * 线的顶点坐标
     */
    @TableField(value = "point_list",typeHandler = JacksonTypeHandler::class)
    var pointList: Any? = null
    /**
     * 线的绘图样式
     */
    @TableField(value = "style",typeHandler = JacksonTypeHandler::class)
    var style: Any? = null
    /**
     * 图状态（1一般，2待审核，3审核完成，4回收站 ,0发布）
     */
    @TableField(value = "state")
    var state: Short? = null
    /**
     * 更新时间
     */
    @TableField(value = "last_update")
    var lastUpdate: Date? = null
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    var createTime: Date? = null
    /**
     * 应用自定义
     */
    @TableField(value = "properties",typeHandler = JacksonTypeHandler::class)
    var properties: Any? = null

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