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

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

/**
 * 工作空间表
 *
 * @author bai
 *
 * @param id
 * @param projectId
 * @param buildingId
 * @param floorId
 * @param spaceId 空间id
 * @param archState 建筑结构核查任务状态: 0-待核查 1-核查中 2-核查完毕
 * @param equipState 设备勘测任务状态: 0-待勘测 1-勘测中 2-勘测完毕)
 */
@Entity(tableName = "workspace")
data class WorkspaceEntity(
    @PrimaryKey @ColumnInfo(name = "id") val id: String,
    @ColumnInfo(name = "project_id") val projectId: String?,
    @ColumnInfo(name = "building_id") val buildingId: String?,
    @ColumnInfo(name = "floor_id") val floorId: String?,
    @ColumnInfo(name = "space_id") val spaceId: String,
    @ColumnInfo(name = "arch_state") var archState: Int?,
    @ColumnInfo(name = "equip_state") var equipState: Int?,
    @ColumnInfo(name = "state") var state: Int = -1,
    @ColumnInfo(name = "valid") var valid: Int = 1,
    @ColumnInfo(name = "ts") val ts: Long = 0L,
    @ColumnInfo(name = "creation_time") val creationTime: String? = null,
    @ColumnInfo(name = "creator") val creator: String? = null,
    @ColumnInfo(name = "modified_time") val modifiedTime: String? = null,
    @ColumnInfo(name = "modifier") val modifier: String? = null
)