guilherme
09/27/2022, 4:07 PMconst user = await this.prismaService.user.findUnique({
where: {
id: userId,
},
select: {
managing: {
select: {
user: {
select: {
person: true,
},
include: {
notifications: {
where: {
dismissAt: null,
},
},
},
},
},
},
},
});
Raphael Etim
09/27/2022, 5:24 PMconst user = await this.prismaService.user.findUnique({
where: {
id: userId,
},
select: {
managing: {
select: {
user: {
select: {
person: true,
},
select: {
_count: {
select: {
notifications: {
where: {
dismissAt: null,
},
},
}
}
},
},
},
},
},
});
guilherme
09/27/2022, 8:07 PMRaphael Etim
09/28/2022, 2:51 AM