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

import androidx.room.Embedded
import androidx.room.Relation
import com.ys.bdtp.adm.mvvm.model.db.entity.task.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>
)
