Created
October 4, 2019 15:07
-
-
Save radzserg/1c366c01b9124b2e164ccf2b5f5e41f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbSeeder.addFactory("user", "users", (data: any = {}): any => { | |
return { | |
id: faker.random.number(999999), | |
first_name: faker.name.findName(), | |
last_name: faker.namelName(), | |
}; | |
}); | |
dbSeeder.addFactory("post", "posts", (data: any = {}): any => { | |
return { | |
id: faker.random.number(999999), | |
user: ref("user"), | |
title: faker.lorem.sentence(), | |
body: faker.lorem.text(), | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment