feat: add mau card

This commit is contained in:
Ephraim Atta-Duncan
2025-01-25 12:23:26 +00:00
parent 54ea96391a
commit c40e802396
2 changed files with 19 additions and 1 deletions

View File

@ -50,6 +50,16 @@ export const getUserWithAtLeastOneDocumentSignedPerMonth = async () => {
});
};
export const getUsersWithLastSignedInCount = async () => {
return await prisma.user.count({
where: {
lastSignedIn: {
gte: DateTime.now().minus({ months: 1 }).toJSDate(),
},
},
});
};
export type GetUserWithDocumentMonthlyGrowth = Array<{
month: string;
count: number;