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

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 * 设备字典表(远程无对应表)
 */
@Entity(tableName = "equipment")
data class EquipmentEntity(
    @PrimaryKey val id: String,
    @ColumnInfo(name = "valid") val valid: Int,                  // 1 正常 0 删除
    @ColumnInfo(name = "project_id") val projectId: String?,      // 项目 id
    @ColumnInfo(name = "code") val code: String?,                 // 设备编码
    @ColumnInfo(name = "name") val name: String?,                 // 设备名称
    @ColumnInfo(name = "obj_type") val objType: String?,          // 对象类型 "system"
    @ColumnInfo(name = "group_code") val groupCode: String?,      // 集团编码
    @ColumnInfo(name = "major_code") val majorCode: String?,      // 专业编码
    @ColumnInfo(name = "system_code") val systemCode: String?,       // 系统编码
    @ColumnInfo(name = "parent_code") val parentCode: String?,    // 父编码
    @ColumnInfo(name = "equipment_code") val equipmentCode: String?, // 设备编码
    @ColumnInfo(name = "creator") val creator: String?,           // 创建人
    @ColumnInfo(name = "creation_time") val creationTime: String?,  // 创建时间
    @ColumnInfo(name = "modifier") val modifier: String?,            // 修改人
    @ColumnInfo(name = "modified_time") val modifiedTime: String?,   // 修改时间
    @ColumnInfo(name = "alias_code") val aliasCode: String?,      // 编码别名
    @ColumnInfo(name = "alias_name") val aliasName: String?,      // 名称别名
    @ColumnInfo(name = "version") val version: String?,              // 版本

    @ColumnInfo(name = "system_name") var systemName: String?,       // 系统编码
)