0.1.5 • Published 1 year ago

@jessenzr/prisma-mass-production v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

#+title: Readme

Create factories and use them to populate database. This package is based on Laravel's Eloquent factories. It can help you generate model instances for your tests or seeding database. It works well with libraries like faker.

It's an experimental package and still in very alpha stage.

  • Examples #+begin_src typescript import { Prisma, User } from '@prisma/client' import Factory from '@jessenzr/prisma-mass-production'

// define the factory const UserFactory = Factory.make<Prisma.UserCreateInput, User>('User', () => ({ name: 'Jonh Smith', }) ) // use the factory await UserFactory.create() await UserFactory.create({ name: 'overriding the default param' }) #+end_src

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago