package com.ys.bdtp.adm.mvvm.model.db.entity.dict

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

/**
 * 字典, 系统表
 *
 * @author bai
 *
 * @param id
 * @param code 系统编码
 * @param name 系统名称
 * @param objType 对象类型: "system"
 * @param aliasCode 编码别名
 * @param aliasName 名称别名
 * @param groupCode 集团编码
 * @param projectId 项目id
 * @param majorCode 专业编码
 * @param systemCode 系统编码
 * @param parentCode 父编码
 * @param equipmentCode 父编设备编码码
 * @param m2d 正向交付设备类标注
 * @param valid 有效标识: 0 无效, 1 有效
 * @param version 版本
 * @param sourceFrom
 * @param creator 创建人
 * @param creationTime 创建时间
 * @param modifier 最后修改人
 * @param modifiedTime 最后修改时间
 */
@Entity(tableName = "system")
data class SystemEntity(
    @PrimaryKey @ColumnInfo(name = "id") val id: String,
    @ColumnInfo(name = "code") val code: String,
    @ColumnInfo(name = "name") val name: String,
    @ColumnInfo(name = "obj_type") val objType: String,
    @ColumnInfo(name = "alias_code") val aliasCode: String?,
    @ColumnInfo(name = "alias_name") val aliasName: String?,
    @ColumnInfo(name = "group_code") val groupCode: String?,
    @ColumnInfo(name = "project_id") val projectId: 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 = "m2d") var m2d: Boolean,
    @ColumnInfo(name = "valid") var valid: Int?,
    @ColumnInfo(name = "version") val version: String?,
    @ColumnInfo(name = "source_from") var sourceFrom: Boolean,
    @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,
)