package com.framework.mvvm.model.db.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.serialization.Serializable

/**
 * 设备问题 表
 */
@Entity(tableName = "problem_equip")
@Serializable
data class ProblemEquipEntity(
    @PrimaryKey val id: String,
    @ColumnInfo(name = "floor_id") val floorId: String,            // 问题所在楼层id
    @ColumnInfo(name = "project_id") val projectId: String,        // 项目id
    @ColumnInfo(name = "building_id") val buildingId: String,      // 建筑id
    @ColumnInfo(name = "equip_id") val equipId: String,            // 设备id
    @ColumnInfo(name = "work_id") val workId: String?,              // 交付工作流程id
    @ColumnInfo(name = "problem_type") val problemType: String?,    // 问题类型
    @ColumnInfo(name = "problem_state") val problemState: Int?,     // 建筑结构核查任务状态(0:删除;1:有效;2:已解决)
    @ColumnInfo(name = "message") val message: String?,             // 问题描述
    @ColumnInfo(name = "creator") val creator: String?,             // 创建人
    @ColumnInfo(name = "creation_time") val creationTime: String?,  // 创建时间
    @ColumnInfo(name = "modifier") val modifier: String?,           // 修改人
    @ColumnInfo(name = "modified_time") var modifiedTime: String?,  // 修改时间
    @ColumnInfo(name = "upload_flag") val uploadFlag: String?,      // app端上传数据标记
    @ColumnInfo(name = "valid") val valid: Int?,                    // 1 有效，2 无效
    @ColumnInfo(name = "state") var state: String? = "0"             // 数据状态：0：未处理，1：已处理 2：已上传
)
