package cn.sagacloud.server.datacenter.models.entities

import cn.sagacloud.server.datacenter.models.entities.base.BaseInfoSuper
import com.alibaba.fastjson.annotation.JSONField
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table

/**
 * 自定义信息点具体信息
 *
 * @author 张维新
 */
@ApiModel(description = "物理世界自定义信息点方案实体类")
@Table(name = "dict.data_platform_scheme_info")
class DataPlatformSchemeInfo : BaseInfoSuper() {

    /** 一级标签 */
    @ApiModelProperty(value = "一级标签")
    @Column(name = "first_tag")
    @JSONField(name = "FirstTag")
    var firstTag: String? = ""

    /** 一级名称 */
    @ApiModelProperty(value = "一级名称")
    @Column(name = "first_name")
    @JSONField(name = "FirstName")
    var firstName: String? = ""

    /** 二级标签 */
    @ApiModelProperty(value = "二级标签")
    @Column(name = "second_tag")
    @JSONField(name = "SecondTag")
    var secondTag: String? = ""

    /** 二级名称 */
    @ApiModelProperty(value = "二级名称")
    @Column(name = "second_name")
    @JSONField(name = "SecondName")
    var secondName: String? = ""

    /** 信息点名称 */
    @ApiModelProperty(value = "信息点名称")
    @Column(name = "info_point_name")
    @JSONField(name = "InfoPointName")
    var infoPointName: String? = null

    /** 信息点编码 */
    @ApiModelProperty(value = "信息点编码")
    @Id
    @Column(name = "info_point_code")
    @JSONField(name = "InfoPointCode")
    var infoPointCode: String? = null

    /** 类型 */
    @ApiModelProperty(value = "类型")
    @Column(name = "datatype")
    @JSONField(name = "DataType")
    var dataType: String? = null

    /** 输入方式 */
    @ApiModelProperty(value = "输入方式")
    @Column(name = "inputmode")
    @JSONField(name = "InputMode")
    var inputMode: String? = null

    /** 单位 */
    @ApiModelProperty(value = "单位")
    @Column(name = "unit")
    @JSONField(name = "Unit")
    var unit: String? = null

    /** 类型 */
    @ApiModelProperty(value = "类型")
    @Column(name = "type")
    @JSONField(name = "Type")
    var type: String? = null

    /** 父指针 */
    @ApiModelProperty(value = "父指针")
    @Column(name = "parent_id")
    @JSONField(name = "ParentId")
    var parentId: String? = null

    /** 标记 */
    @ApiModelProperty(value = "标记")
    @Column(name = "flag")
    @JSONField(name = "Flag")
    var  flag: String? = null

    /** 字典选择 */
    @ApiModelProperty(value = "字典选择")
    @Column(name = "datasource")
    @JSONField(name = "DataSource",serialize=false)
    var dataSource: String? = null

    /** 备注 */
    @ApiModelProperty(value = "字典选择")
    @Column(name = "note")
    @JSONField(name = "Note")
    var note: String? = null

    /** 优先级 */
    @ApiModelProperty(value = "优先级")
    @Column(name = "priority")
    @JSONField(name = "Priority")
    var priority: String? = null

    /** 是否显示 */
    @ApiModelProperty(value = "是否显示")
    @Column(name = "visible")
    @JSONField(name = "Visible")
    var visible: Boolean? = null

    /** 是否编辑 */
    @ApiModelProperty(value = "是否编辑")
    @Column(name = "editable")
    @JSONField(name = "Editable")
    var editable: Boolean? = null

    /** 排序 */
    @ApiModelProperty(value = "排序")
    @Column(name = "sort")
    @JSONField(name = "Sort")
    var sort: Int? = null

    /** 方案id */
    @ApiModelProperty(value = "方案id")
    @Id
    @Column(name = "scheme_id")
    @JSONField(name = "SchemeId")
    var schemeId: String? = null

    /** 服务于哪个设备或部件、资产 */
    @ApiModelProperty(value = "服务于哪个设备或部件、资产")
    @Id
    @Column(name = "obj_type")
    @JSONField(name = "ObjectType")
    var objType: String? = null

}  // Class DataPlatformSchemeInfo