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

/**
 * 二维码表
 */
@Entity(tableName = "qr_code")
data class QrCodeEntity(
    @PrimaryKey @ColumnInfo(name = "id") override val id: String,
    @ColumnInfo(name = "project_id") override val projectId: String,
    @ColumnInfo(name = "building_id") override val buildingId: String,
    @ColumnInfo(name = "floor_id") override val floorId: 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 = "qr_code") val qrCode: String = "",              // 二维码数据值
    @ColumnInfo(name = "obj_id") val objId: String = "",                // 二维码对应的对象id
    @ColumnInfo(name = "remark") val remark: String? = "",              // 描述信息
    @ColumnInfo(name = "location") val location: JsonElement? = null,   // 位置坐标({x:1,y:1,z:1})
) : BaseEntity