mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
20 lines
437 B
TypeScript
20 lines
437 B
TypeScript
import { prisma } from '..';
|
|
|
|
export const seedTestEmail = () => `user-${Date.now()}@test.documenso.com`;
|
|
|
|
type SeedSubscriptionOptions = {
|
|
userId: number;
|
|
priceId: string;
|
|
};
|
|
|
|
export const seedUserSubscription = async ({ userId, priceId }: SeedSubscriptionOptions) => {
|
|
return await prisma.subscription.create({
|
|
data: {
|
|
userId,
|
|
planId: Date.now().toString(),
|
|
priceId,
|
|
status: 'ACTIVE',
|
|
},
|
|
});
|
|
};
|