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

import com.persagy.service.models.SBaseEntity
import io.swagger.v3.oas.annotations.media.Schema
import java.io.Serializable
import java.util.*
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 图例
 *
 * @author wx
 */
@Schema(description = "图例")
@Table(name = "labsl.graph_pub")
class GraphPub : SBaseEntity(), Serializable {

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

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

    /** 图名称 */
    @Schema(description = "图名称")
    @Column(name = "name")
    var name: String? = null

    /** 图分类id */
    @Schema(description = "图分类id")
    @Column(name = "category_id")
    var categoryId: String? = null

    /** 项目id */
    @Schema(description = "项目id")
    @Column(name = "project_id")
    var projectId: String? = null

    /** 建筑id */
    @Schema(description = "建筑id")
    @Column(name = "building_id")
    var buildingId: String? = null

    /** 楼层id */
    @Schema(description = "楼层id")
    @Column(name = "floor_id")
    var floorId: String? = null

    /** 说明 */
    @Schema(description = "说明")
    @Column(name = "note")
    var note: String? = null

    /** 背景色 */
    @Schema(description = "背景色")
    @Column(name = "view_background")
    var viewBackground: String? = null

    /** 版本号 */
    @Schema(description = "版本号")
    @Column(name = "version")
    var version: String? = null

    @Schema(description = "系统图展示所需数据")
    var elements: ElementsPub? = null

    /** 移至回收站时间 */
    @Schema(description = "移至回收站时间")
    @Column(name = "del_time")
    var delTime: Date? = null

    /** 移至回收站时间 */
    @Schema(description = "移至回收站时间 , false 正常，true 以至回收站")
    @Column(name = "is_available")
    var isAvailable: Boolean? = false

    /** 内部版本号 */
    @Schema(description = "内部版本号")
    @Column(name = "tag_version")
    var tagVersion: Int? = null

//    /** 内部版本号 */
//    @Schema(description = "是否发布（true 发布、false 未发布）")
//    @Column(name = "is_pub")
//    var isPub: Boolean = false

    /** 图片Key */
    @Schema(description = "图片Key")
    @Column(name = "pic")
    var pic: String? = null

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

    /** 页面尺寸 */
    @Schema(description = "页面尺寸")
    @Column(name = "page_size")
    var pageSize: HashMap<String, Any?>? = null

    /** 标签 */
    @Schema(description = " 标签 ")
    @Column(name = "label")
    var label: ArrayList<String>? = null

} // Class Graph