adonisjs / discussion

Discussing about new features and sharing random thoughts: ⚠️ Not every request will be accepted
51 stars 5 forks source link

how can I create a fake data by combining a "custom data" with faker #63

Closed malepatip closed 6 years ago

malepatip commented 6 years ago

Hello,

I am looking for a way to create a fake JIRA/TFS issues, for which I wanted to use FAKER API, but not sure how can I generate a data in this scenario. My JIRA/TFS numbers look like these "JIRA-1234" or "TFS-54367"

Can someone help me with a reference example on how factory and seeders looks like?

malepatip commented 6 years ago

I was able to figure it out 'JIRA-'+ faker.natural({min: 500000, max: 699999})

RomainLanz commented 6 years ago

You can even use template literals.

`JIRA-${faker.natural({ min: 500000, max: 699999 })}`