Factory
Create fake data and records with ease!
npm add @prisma-extensions/factory
import { PrismaClient } from '@prisma/client';
import { factoryExtension } from '@prisma-extensions/factory';
const prisma = new PrismaClient();
const db = prisma.$extends(factoryExtension);
const UserFactory = db.user.$factory({
firstName: 'Tom',
lastName: 'Milewski',
})
UserFactory.attributes();
UserFactory.create();