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

/**
 * 文件表
 */
@Entity(tableName = "file")
data class FileEntity(
    @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 = "biz_type") val bizType: String? = "",            // 业务类型(object:对象附件|problem_arch:空间问题附件|problem_equip:设备问题附件)
    @ColumnInfo(name = "file_path") val filePath: String? = "",          // 文件存储路径
    @ColumnInfo(name = "file_type") val fileType: String? = "",          // 文件类型(photo|video|file|...)
    @ColumnInfo(name = "client_path") val clientPath: String? = "",      // app端文件存储路径
    @ColumnInfo(name = "ref_obj_id") val refObjId: String? = "",         // 关联的对象id
    @ColumnInfo(name = "ref_info_code") val refInfoCode: String? = "",   // 关联的对象信息点code
    @ColumnInfo(name = "remark") val remark: String? = "",               // 描述
    @ColumnInfo(name = "order_num") val orderNum: Int? = -1,             // 文件附件(照片)的排序序号
    @ColumnInfo(name = "file_id") val fileId: String? = "",              // 文件服务中存储的id
) : BaseEntity