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

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.google.gson.JsonElement

/**
 * 字典, 信息表
 *
 * @author bai
 *
 * @param id
 * @param code 信息编码
 * @param name 信息名称
 * @param aliasCode 编码别名
 * @param classCode 类型编码
 * @param groupCode 集团编码
 * @param projectId 项目id
 * @param firstTag
 * @param secondTag
 * @param inputMode
 * @param unit
 * @param dataType
 * @param dataSource
 * @param showOrder
 * @param version
 *
 */
@Entity(tableName = "info_dict")
data class InfoDictEntity(
    @PrimaryKey @ColumnInfo(name = "id") val id: String,
    @ColumnInfo(name = "code") val code: String? = null,
    @ColumnInfo(name = "name") val name: String? = null,
    @ColumnInfo(name = "alias_code") val aliasCode: String? = null,
    @ColumnInfo(name = "alias_name") val aliasName: String? = null,
    @ColumnInfo(name = "class_code") val classCode: String? = null,
    @ColumnInfo(name = "group_code") val groupCode: String? = null,
    @ColumnInfo(name = "project_id") val projectId: String? = null,
    @ColumnInfo(name = "first_tag") val firstTag: String? = null,
    @ColumnInfo(name = "second_tag") val secondTag: String? = null,
    @ColumnInfo(name = "input_mode") val inputMode: String? = null,
    @ColumnInfo(name = "data_type") val dataType: String? = null,
    @ColumnInfo(name = "unit") val unit: String? = null,
    @ColumnInfo(name = "show_order") val showOrder: Int? = null,
    @ColumnInfo(name = "category") val category: String? = null,
    @ColumnInfo(name = "collect_info") val collectInfo: String? = null,
    @ColumnInfo(name = "data_from") val dataFrom: String? = null,
    @ColumnInfo(name = "define_info_id") val defineInfoId: String? = null,
    @ColumnInfo(name = "delivery_type") val deliveryType: Int? = null,
    @ColumnInfo(name = "formater") val formater: String? = null,
    @ColumnInfo(name = "is_delivery") val isDelivery: Boolean,
    @ColumnInfo(name = "is_multiple") val isMultiple: Boolean,
    @ColumnInfo(name = "is_region") val isRegion: Boolean,
    @ColumnInfo(name = "priority") val priority: String? = "",
    @ColumnInfo(name = "source_from") var sourceFrom: Int,
    @ColumnInfo(name = "sub_flag") var subFlag: Boolean,
    @ColumnInfo(name = "weak_point") var weakPoint: Boolean,
    @ColumnInfo(name = "valid") var valid: Int?,
    @ColumnInfo(name = "version") val version: String? = "",
    @ColumnInfo(name = "creator") val creator: String? = "",
    @ColumnInfo(name = "creation_time") val creationTime: Long = 0L,
    @ColumnInfo(name = "data_source") val dataSource: JsonElement? = null,
)