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

/**
 * 核查问题记录表
 *
 * @author bai
 *
 * @param id
 * @param groupCode 集团编码
 * @param projectId 项目id
 * @param buildingId 建筑id
 * @param floorId 楼层id
 * @param fileId 文件id
 * @param checkType 核查类型: 1 空间, 2 对象
 * @param objTypeCode 问题对象类型编码
 * @param objTypeName 问题对象类型名称
 * @param objId 问题对象id
 * @param objName 问题对象名称
 * @param typeCode 问题类型编码
 * @param typeName 问题类型编码
 * @param info 问题描述
 * @param status 核查状态: 1 有效, 2 已解决
 * @param valid 合法标识
 * @param creator 创建人
 * @param creationTime 创建时间
 * @param modifier 最后修改人
 * @param modifiedTime 最后修改时间
 * @param ts 时间戳
 *
 */
@Entity(tableName = "problem")
class ProblemEntity(
    @PrimaryKey @ColumnInfo(name = "id") val id: String,
    @ColumnInfo(name = "group_code") val groupCode: String? = null,
    @ColumnInfo(name = "project_id") val projectId: String,
    @ColumnInfo(name = "building_id") val buildingId: String,
    @ColumnInfo(name = "floor_id") val floorId: String,
    @ColumnInfo(name = "file_id") val fileId: String,
    @ColumnInfo(name = "check_type") val checkType: Int,
    @ColumnInfo(name = "obj_type_code") val objTypeCode: String,
    @ColumnInfo(name = "obj_type_name") val objTypeName: String,
    @ColumnInfo(name = "obj_id") val objId: String,
    @ColumnInfo(name = "obj_name") val objName: String,
    @ColumnInfo(name = "type_code") val typeCode: String,
    @ColumnInfo(name = "type_name") val typeName: String,
    @ColumnInfo(name = "info") val info: JsonElement,
    @ColumnInfo(name = "status") val status: Int,
    @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
)