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

import com.persagy.labsl.models.entities.tpt.Pos
import com.persagy.labsl.models.entities.tpt.Size
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.marker")
open class Markers : SBaseEntity(), Serializable {

    /** 图对象id */
    @Schema(description = "图对象id" ,required = true)
    @Id
    @Column(name = "id")
    var id: String? = null

    /** 标识id */
    @Schema(description = "标识id",required = true )
    @Id
    @Column(name = "marker_id")
    var markerId: String? = null

    /** 标识名称 */
    @Schema(description = "标识名称" ,required = true)
    @Column(name = "name")
    var name: String? = null

    /** 图标（Image），线类型(Line)，文本（Text） */
    @Schema(description = "图标（Image），线类型(Line)，文本（Text）")
    @Column(name = "type")
    var type: String? = null

    /** 位置信息 */
    @Schema(description = "位置信息")
    @Column(name = "pos")
    var pos: Pos? = null

    /** 缩放 */
    @Schema(description = "缩放")
    @Column(name = "scale")
    var scale: Pos? = null

    /** 旋转 */
    @Schema(description = "旋转")
    @Column(name = "rotate")
    var rotate: Pos? = null

    /** 大小 */
    @Schema(description = "大小")
    @Column(name = "size")
    var size: Size? = null

    @Schema(description = "应用自定义")
    @Column(name = "properties")
    var properties : HashMap<String,Any?>? = null

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

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

    @Schema(description = "线的绘图样式")
    @Column(name = "style")
    var style : HashMap<String,Any?>? = null

} // Class Markers