package com.persagy.server.labsl.models.entities

import com.persagy.service.models.SBaseEntity
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.io.Serializable
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 文本注释，图上的图片说明
 *
 * @author wx
 */
@ApiModel(description = "文本注释，图上的图片说明")
@Table(name = "labsl.marker")
open class Markers : SBaseEntity(), Serializable {

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

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

    /** 标识名称 */
    @ApiModelProperty(value = "标识名称")
    @Column(name = "name")
    var name: String? = null

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

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

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

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

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

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

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

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

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

} // Class Markers