-
Notifications
You must be signed in to change notification settings - Fork 58
/
seed.ts
56 lines (55 loc) · 1.35 KB
/
seed.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
const freeTrial = await prisma.plan.upsert({
where: { name: 'Free Trial' },
update: {},
create: {
name: 'Free Trial',
features: ['ADD_NOTES', 'EDIT_NOTES', 'VIEW_NOTES'],
max_notes: 10,
max_members: 1,
ai_gen_max_pm: 7
}
});
const individualPlan = await prisma.plan.upsert({
where: { name: 'Individual Plan' },
update: {},
create: {
name: 'Individual Plan',
features: ['ADD_NOTES', 'EDIT_NOTES', 'VIEW_NOTES', 'SPECIAL_FEATURE'],
max_notes: 100,
max_members: 1,
ai_gen_max_pm: 50,
stripe_product_id: 'prod_NQR7vwUulvIeqW'
}
});
const teamPlan = await prisma.plan.upsert({
where: { name: 'Team Plan' },
update: {},
create: {
name: 'Team Plan',
features: [
'ADD_NOTES',
'EDIT_NOTES',
'VIEW_NOTES',
'SPECIAL_FEATURE',
'SPECIAL_TEAM_FEATURE'
],
max_notes: 200,
max_members: 10,
ai_gen_max_pm: 500,
stripe_product_id: 'prod_NQR8IkkdhqBwu2'
}
});
console.log({ freeTrial, individualPlan, teamPlan });
}
main()
.then(async () => {
await prisma.$disconnect();
})
.catch(async e => {
console.error(e);
await prisma.$disconnect();
process.exit(1);
});