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 = "qr_code")
@Serializable
data class QrCodeEntity(
    @PrimaryKey val id: String,
    @ColumnInfo(name = "qr_code") val qrCode: String,              // 二维码数据值
    @ColumnInfo(name = "obj_id") val objId: String,                // 二维码对应的对象id
    @ColumnInfo(name = "project_id") val projectId: String,        // 项目id
    @ColumnInfo(name = "building_id") val buildingId: String,      // 建筑id
    @ColumnInfo(name = "floor_id") val floorId: String,            // 楼层id
    @ColumnInfo(name = "remark") val remark: 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 = "valid") val valid: Int?,                 // 合法标识
    @ColumnInfo(name = "upload_flag") val uploadFlag: String?,      // app端上传数据标记
    @ColumnInfo(name = "location") val location: String?,           // 位置坐标({x:1,y:1,z:1})
    @ColumnInfo(name = "strLocation") val strLocation: String?,           // 位置坐标({x:1,y:1,z:1})
    @ColumnInfo(name = "state") var state: String? = "0"             // 数据状态：0：未处理，1：已处理 2：已上传

)