prettier fixes #16
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
// Workaround for prisma issue (https://github.com/prisma/prisma/issues/12504#issuecomment-1147356141)
|
||||
|
||||
// Import original enum as type
|
||||
import type { ACCOUNT_ACCESS as ACCOUNT_ACCESS_ORIGINAL } from '@prisma/client'
|
||||
import type { ACCOUNT_ACCESS as ACCOUNT_ACCESS_ORIGINAL } from '@prisma/client';
|
||||
|
||||
// Guarantee that the implementation corresponds to the original type
|
||||
export const ACCOUNT_ACCESS: { [k in ACCOUNT_ACCESS_ORIGINAL ]: k } = {
|
||||
export const ACCOUNT_ACCESS: { [k in ACCOUNT_ACCESS_ORIGINAL]: k } = {
|
||||
READ_ONLY: 'READ_ONLY',
|
||||
READ_WRITE: 'READ_WRITE',
|
||||
ADMIN: 'ADMIN',
|
||||
OWNER: 'OWNER'
|
||||
} as const
|
||||
} as const;
|
||||
|
||||
// Re-exporting the original type with the original name
|
||||
export type ACCOUNT_ACCESS = ACCOUNT_ACCESS_ORIGINAL
|
||||
export type ACCOUNT_ACCESS = ACCOUNT_ACCESS_ORIGINAL;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import pkg from "@prisma/client";
|
||||
import pkg from '@prisma/client';
|
||||
|
||||
const { PrismaClient } = pkg;
|
||||
const prisma_client = new PrismaClient()
|
||||
export default prisma_client
|
||||
const prisma_client = new PrismaClient();
|
||||
export default prisma_client;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
const prisma = new PrismaClient()
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
const prisma = new PrismaClient();
|
||||
async function main() {
|
||||
const freeTrial = await prisma.plan.upsert({
|
||||
where: { name: 'Free Trial' },
|
||||
@@ -9,8 +9,8 @@ async function main() {
|
||||
features: ['ADD_NOTES', 'EDIT_NOTES', 'VIEW_NOTES'],
|
||||
max_notes: 10,
|
||||
max_members: 1,
|
||||
ai_gen_max_pm: 7,
|
||||
},
|
||||
ai_gen_max_pm: 7
|
||||
}
|
||||
});
|
||||
const individualPlan = await prisma.plan.upsert({
|
||||
where: { name: 'Individual Plan' },
|
||||
@@ -22,29 +22,35 @@ async function main() {
|
||||
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'],
|
||||
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 })
|
||||
console.log({ freeTrial, individualPlan, teamPlan });
|
||||
}
|
||||
main()
|
||||
.then(async () => {
|
||||
await prisma.$disconnect()
|
||||
await prisma.$disconnect();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
console.error(e)
|
||||
await prisma.$disconnect()
|
||||
process.exit(1)
|
||||
})
|
||||
.catch(async e => {
|
||||
console.error(e);
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user