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

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import kotlinx.serialization.Contextual
import kotlinx.serialization.Serializable
import org.json.JSONObject

/**
 * 项目表(远程无对应表)
 */
@Entity(tableName = "project")
@Serializable
data class ProjectEntity(
    @PrimaryKey val id: String,
    @ColumnInfo(name = "name") val name: String,
    @ColumnInfo(name = "object_type") val objectType: String,
    @ColumnInfo(name = "create_time") val createTime: String,
    @ColumnInfo(name = "last_update") val lastUpdate: String,
    @ColumnInfo(name = "group_code") val groupCode: String,
    @ColumnInfo(name = "local_id") val localId: String?,
    @ColumnInfo(name = "local_name") val localName: String?,
    @ColumnInfo(name = "introduction") val introduction: String?,
    @ColumnInfo(name = "business_floor_num") val businessFloorNum: String?,
    @ColumnInfo(name = "office_floor_num") val officeFloorNum: String?,
    @ColumnInfo(name = "infos")
    @Contextual
    val infos: JSONObject?
)