Need help in writing prisma query to get stages assigned to user with stage name?
this is the scheme eg
model User {
id
name
mytasks userassignments[]
}
enum APPSTEP{
Scoping
Contact
OnBoard
}
model userassignments {
id
userid
appStep APPSTEP
}
i need to get user with appStep count
something like tis
[
id:1,
myTasks:[
{scoping:1},
{contact:5},
{invoice:3},
]
]