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

import androidx.room.Embedded
import androidx.room.Relation
import com.ys.bdtp.adm.mvvm.model.db.entity.ProjectEntity
import com.ys.bdtp.adm.mvvm.model.db.entity.UserEntity

/**
 * User 与 Project 一对多关系
 *
 */
data class UserWithProjects(
    @Embedded val user: UserEntity,
    @Relation(
        parentColumn = "id",
        entityColumn = "user_id"
    )
    val projects: List<ProjectEntity>
)
