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

/**
 * 关系(业务)表
 *
 * @author bai
 *
 * @param id
 * @param graphId 图id
 * @param graphCode 图编码
 * @param groupCode 集团代码
 * @param projectId 项目id
 * @param objFrom 关系源对象
 * @param objTo 关系目标对象
 * @param relCode 关系编码
 * @param relValue 关系值
 * @param ts
 *
 */
@Entity(tableName = "relation")
data class RelationEntity(
    @PrimaryKey @ColumnInfo(name = "id") val id: String,
    @ColumnInfo(name = "graph_id") val graphId: String? = null,
    @ColumnInfo(name = "graph_code") val graphCode: String? = null,  //
    @ColumnInfo(name = "group_code") val groupCode: String? = null,         // 集团代码
    @ColumnInfo(name = "project_id") val projectId: String,
    @ColumnInfo(name = "obj_from") val objFrom: String? = null, // 关系源对象
    @ColumnInfo(name = "obj_to") val objTo: String? = null,// 关系目标对象
    @ColumnInfo(name = "rel_code") val relCode: String? = null,             // 关系编码
    @ColumnInfo(name = "rel_value") val relValue: String? = null,           // 关系值
    @ColumnInfo(name = "ts") val ts: Long,
    @ColumnInfo(name = "valid") val valid: Int,
    @ColumnInfo(name = "creator") val creator: String,
    @ColumnInfo(name = "create_app") val createApp: String,
    @ColumnInfo(name = "creation_time") val creationTime: Long,
    @ColumnInfo(name = "modifier") val modifier: String,
    @ColumnInfo(name = "modifier_time") val modifiedTime: Long
)