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

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

/**
 * 规则
 *
 * @author wx  <zhangweixin@sagacloud.com>
 * @date  2020/12/13 9:20
 */
@Schema(description = "规则")
@Table(name = "qibaishi_gallery.qbs_rule")
open class PlanarQbsRule : SBaseEntity() {


    /** 图对象id */
    @Schema(description = "图对象id" )
    @Id
    @Column(name = "id",unique = false,insertable = false)
    var id: Long? = null

    /** 图编码 */
    @Schema(description = "图编码" ,required = true)
    @Id
    @Column(name = "graph_coding")
    var graphCoding: String? = null

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

    /** (equip: 设备, equipGroup: 设备组, zone: 空间) */
    @Schema(description = "(equip: 设备, equipGroup: 设备组, zone: 空间)" ,required = true)
    @Column(name = "return_type")
    var returnType: String? = null

    /** query: 查询, delete: 删除 */
    @Schema(description = "query: 查询, delete: 删除" ,required = true)
    @Column(name = "commond")
    var commond: String? = null

    /** 查询参数 */
    @Schema(description = "查询参数" ,required = true)
    @Column(name = "params")
    var params: HashMap<String,Any?>? = null

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

}