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

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

/**
 * custom_info 自定义信息表
 *  根据 problemTypeCode 自定义信息点
 *
 * @author bai
 *
 * @param id
 * @param code 信息点编码
 * @param name 信息点名称
 * @param problemTypeCode 问题类型编码
 * @param unit 单位
 * @param dataType 数据类型
 * @param dataSource 数据源
 * @param isMultiple 0 单选，1 多选
 * @param remark 备注
 * @param valid 合法标识
 * @param creator 创建人
 * @param creationTime 创建时间
 * @param modifier 最后修改人
 * @param modifiedTime 最后修改时间
 * @param ts 时间戳
 *
 */
@Entity(tableName = "custom_info")
class CustomInfoEntity(
    @PrimaryKey @ColumnInfo(name = "id") val id: String,
    @ColumnInfo(name = "code") val code: String,
    @ColumnInfo(name = "name") val name: String,
    @ColumnInfo(name = "problem_type_code") val problemTypeCode: String,
    @ColumnInfo(name = "unit") val unit: String,
    @ColumnInfo(name = "data_type") val dataType: String,
    @ColumnInfo(name = "data_source") val dataSource: JsonElement,
    @ColumnInfo(name = "is_multiple") val isMultiple: Int,
    @ColumnInfo(name = "remark") val remark: String,
    @ColumnInfo(name = "valid") val valid: Int,
    @ColumnInfo(name = "creator") val creator: String,
    @ColumnInfo(name = "creation_time") val creationTime: String,
    @ColumnInfo(name = "modifier") val modifier: String,
    @ColumnInfo(name = "modified_time") val modifiedTime: String,
    @ColumnInfo(name = "ts") val ts: Long
)