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 java.util.*
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 图例
 *
 * @author wx
 */
@ApiModel(description = "图例")
@Table(name = "labsl.graph")
open class Graph : SBaseEntity(), Serializable {

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

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

    /** 图名称 */
    @ApiModelProperty(value = "图名称",required = true )
    @Column(name = "name")
    var name: String? = null

    /** 图分类id */
    @ApiModelProperty(value = "图分类id",required = true )
    @Column(name = "category_id")
    var categoryId: String? = null

    /** 项目id */
    @ApiModelProperty(value = "项目id",required = true )
    @Column(name = "project_id")
    var projectId: String? = null

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

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

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

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

    @ApiModelProperty(value = "系统图展示所需数据")
    open var elements: Elements? = null

    /** 移至回收站时间 */
    @ApiModelProperty(value = "移至回收站时间",example = "2020-09-20 08:30:00")
    @Column(name = "del_time")
    var delTime: Date? = null

    /** 是否移至回收站 */
    @ApiModelProperty(value = "是否移至回收站 , false 正常，true 以至回收站")
    @Column(name = "is_available")
    var isAvailable: Boolean? = false

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

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

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

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

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

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

} // Class Graph