src/Generators/templates/factory.mustache
'use strict'
/*
|--------------------------------------------------------------------------
| Factory
|--------------------------------------------------------------------------
|
| Factories are used to define blueprints for database tables or Lucid
| models. Later you can use these blueprints to seed your database
| with dummy data.
|
*/
const Factory = use('Factory')
{{ #tables }}
Factory.blueprint('App/Models/{{ name }}', (faker) => {
return {
{{ #columnsArray }}
{{ #fieldRule }}
{{ &fieldRule }}
{{ /fieldRule}}
{{ /columnsArray }}
}
})
{{ /tables }}