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 com.persagy.labsl.models.entities.tpt.Anchor
import io.swagger.v3.oas.annotations.media.Schema
import lombok.Data
import java.io.Serializable
import java.util.*

/**
 *
 * @TableName node
 */
@TableName(value = "node",autoResultMap = true)
@Data
class NodeEntity : Serializable {
    /**
     * 系统图对象id
     */
    @MppMultiId
    @TableField(value = "id")
    var id: String? = null
    /**
     * 节点id
     */
    @MppMultiId
    @TableField(value = "node_id")
    var nodeId: String? = null
    /**
     * 系统图 id
     */
    @MppMultiId
    @TableField(value = "graph_id")
    var graphId: String? = null
    /**
     * 图例节点名称
     */
    @TableField(value = "name")
    var name: String? = null
    /**
     * 图例类型 None/Line/Zone/Image:非图例/线条/区域类型/图标
     */
    @TableField(value = "graph_element_type")
    var graphElementType: String? = null
    /**
     * 图元ID
     */
    @TableField(value = "graph_element_id")
    var graphElementId: String? = null
    /**
     * 节点类型(image / zone)
     */
    @TableField(value = "type")
    var type: String? = null
    /**
     * 位置信息
     */
    @TableField(value = "pos",typeHandler = JacksonTypeHandler::class)
    var pos: Any? = null
    /**
     * 缩放
     */
    @TableField(value = "scale",typeHandler = JacksonTypeHandler::class)
    var scale: Any? = null
    /**
     * 旋转
     */
    @TableField(value = "rotate",typeHandler = JacksonTypeHandler::class)
    var rotate: Any? = null
    /**
     * 大小
     */
    @TableField(value = "size",typeHandler = JacksonTypeHandler::class)
    var size: Any? = null
    /**
     * 轮廓线
     */
    @TableField(value = "outline",typeHandler = JacksonTypeHandler::class)
    var outline: Any? = null
    /**
     * 应用自定义
     */
    @TableField(value = "properties",typeHandler = JacksonTypeHandler::class)
    var properties: Any? = null
    /**
     * 图状态（1一般，2待审核，3审核完成，4回收站 ,0发布）
     */
    @TableField(value = "state")
    var state: Int? = null
    /**
     * 线的绘图样式
     */
    @TableField(value = "style",typeHandler = JacksonTypeHandler::class)
    var style: Any? = null
    /**
     * 更新时间
     */
    @TableField(value = "last_update")
    var lastUpdate: Date? = null
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    var createTime: Date? = null
    /**
     * 对象 id 列表
     */
    @TableField(value = "attach_object_ids",typeHandler = JacksonTypeHandler::class)
    var attachObjectIds: Any? = null

    /** 锚点列表 */
    @TableField(exist = false)
    var anchorList: ArrayList<AnchorEntity>? = null

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