package com.persagy.labsl.models.entities.pbs

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
import javax.validation.constraints.NotNull
import kotlin.collections.HashMap

/**
 * 平面图，已发布
 *
 * @author wx  <zhangweixin@sagacloud.cn>
 */
@Schema(description = "平面图 - 已发布")
@Table(name = "qibaishi_gallery.qbs_graph_pub")
open class PlanarGraphPub : 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 = "graph_id")
    var graphId: String? = null

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

    /** 文件夹 id */
    @Schema(description = "文件夹 id" )
    @Column(name = "folder_id")
    var folderId: String? = null

    /** 文件夹名称 */
    @Schema(description = "文件夹名称" )
    var folderName: String? = null

    /** 项目 id */
    @Schema(description = "项目 id",required = true )
    @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 = "version")
    var version: String? = null

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

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

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

    /** 图状态（Draft: 未发布, WaitCheck: 待审核, Checked: 审核完成, Recyle: 回收站, Publish: 发布） */
    @Schema(description = "图状态（Draft: 未发布, WaitCheck: 待审核, Checked: 审核完成, Recyle: 回收站, Publish: 发布）")
    @Column(name = "state")
    var state: String? = null

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

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

    /** 用户 */
    @Schema(description = "用户")
    @Column(name = "user")
    var user: String? = null

    /** 风格 */
    @Schema(description = "风格")
    @Column(name = "style")
    var style: HashMap<String,Any?>? = null

    /** 隐藏的实例ID( 设备,空间 在物理世界的ID) */
    @Schema(description = "隐藏的实例ID( 设备,空间 在物理世界的ID)")
    @Column(name = "hide_list")
    var hideList: ArrayList<String>? = null

    /** 规则列表 */
    @Schema(description = "规则列表)")
    var ruleList: ArrayList<PlanarQbsRulePub>? = null

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


}