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

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

/**
 * 关系配置 表
 *
 * @author bai
 *
 * @param id
 * @param objTypeFrom from 端对象类型(space|equipment)
 * @param objTypeTo to 端对象类型(space|equipment)
 * @param classCodeFrom from 端对象class_code
 * @param classCodeTo to 端对象class_code
 * @param graphCode 关系的图类型编码
 * @param graphName 关系的图类型名称
 * @param relCode 关系的边类型编码
 * @param relName 关系的边类型名称
 * @param direction 关系方向(fixed|optional|none)
 */
@Entity(tableName = "relation_config")
data class RelationConfigEntity(
    @PrimaryKey @ColumnInfo(name = "id") val id: String,
    @ColumnInfo(name = "obj_type_from") val objTypeFrom: String?,
    @ColumnInfo(name = "obj_type_to") val objTypeTo: String?,
    @ColumnInfo(name = "class_code_from") val classCodeFrom: String?,
    @ColumnInfo(name = "class_code_to") val classCodeTo: String?,
    @ColumnInfo(name = "graph_code") val graphCode: String?,
    @ColumnInfo(name = "graph_name") val graphName: String?,
    @ColumnInfo(name = "rel_code") val relCode: String?,
    @ColumnInfo(name = "rel_name") val relName: String?,
    @ColumnInfo(name = "direction") val direction: String?,
)
