package com.ys.bdtp.adm.mvvm.model.db.entity.config

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.google.gson.JsonElement

/**
 * 信息配置 表
 *
 * @author bai
 *
 * @param id
 * @param name 对象类型名称
 * @param projectId 系项目id
 * @param objType 对象类型(space|equipment)
 * @param classCode 对象class_code
 * @param majorCode 专业代码(类型为设备时)
 * @param systemCode 系统代码(类型为设备时)
 * @param systemCode 对象类型的信息详情点配置

 */
@Entity(tableName = "infos_config")
data class InfosConfigEntity(
    @PrimaryKey val id: String,
    @ColumnInfo(name = "name") val name: String?,
    @ColumnInfo(name = "project_id") val projectId: String?,
    @ColumnInfo(name = "obj_type") val objType: String?,
    @ColumnInfo(name = "class_code") val classCode: String?,
    @ColumnInfo(name = "major_code") val majorCode: String?,
    @ColumnInfo(name = "system_code") val systemCode: String?,
    @ColumnInfo(name = "infos") val infos: JsonElement? = null
)

/**
 * 信息配置的额外信息
 */
data class InfosConfigInfos(
    val code: String,
    val name: String,
    val group: String,
    val label: String,
    val inputType: String,
    val cfgItemType: String
)