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

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.framework.mvvm.model.db.entity.BaseEntity
import com.google.gson.JsonElement

/**
 * 结构问题  表
 */
@Entity(tableName = "problem_arch")
data class ProblemArchEntity(
    @PrimaryKey @ColumnInfo(name = "id") override val id: String,
    @ColumnInfo(name = "floor_id") override val floorId: String,
    @ColumnInfo(name = "project_id") override val projectId: String,
    @ColumnInfo(name = "building_id") override val buildingId: String,
    @ColumnInfo(name = "state") override var state: Int = -1,
    @ColumnInfo(name = "valid") override var valid: Int = 1,
    @ColumnInfo(name = "ts") override val ts: Long = 0L,
    @ColumnInfo(name = "geom_type") val geomType: String? = "",        // 问题记录的几何类型(point|line|polygon)
    @ColumnInfo(name = "work_id") val workId: String? = "",            // 交付工作流程id
    @ColumnInfo(name = "problem_type") val problemType: String? = "",  // 问题类型
    @ColumnInfo(name = "problem_state") var problemState: Int? = null, // 建筑结构核查任务状态(0:删除;1:有效;2:已解决)
    @ColumnInfo(name = "message") val message: String? = "",           // 问题描述
    @ColumnInfo(name = "geom") val geom: JsonElement? = null,          // 问题记录的几何数据(Json)
) : BaseEntity
