Prisma, Authorization, Typescript, Web Development.
'ADMIN', }, ], }, }, }); // Joe as admin of org Microsoft const microsoft = await prisma.org.create({ data: { name: 'Microsoft', members: { create: [{ user: { connect: { id: joe.id } }, role: 'ADMIN' }], }, }, }); // create an enhanced PrismaClient for each user const emilyDb = enhance(prisma, {