mirror of
https://github.com/documenso/documenso.git
synced 2025-11-11 04:52:41 +10:00
19 lines
418 B
TypeScript
19 lines
418 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
import { SubscriptionStatus } from '@documenso/prisma/client';
|
|
|
|
export const getUsersCount = async () => {
|
|
return await prisma.user.count();
|
|
};
|
|
|
|
export const getUsersWithSubscriptionsCount = async () => {
|
|
return await prisma.user.count({
|
|
where: {
|
|
Subscription: {
|
|
some: {
|
|
status: SubscriptionStatus.ACTIVE,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
};
|