File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 88 - npm start build
99notifications :
1010 email : false
11+ env :
12+ - APP_ROUTE="http://localhost:3000"
Original file line number Diff line number Diff line change @@ -287,6 +287,20 @@ export class CreateUsers implements SeedsInterface {
287287 public async seed(factory : FactoryInterface ): Promise <any > {
288288 await factory
289289 .get (User )
290+ .create (10 );
291+ }
292+
293+ }
294+ ` ` `
295+
296+ With the second parameter in the ` .get (<Entity >, <args >)` you are able to create different variations of entities.
297+
298+ ` ` ` typescript
299+ export class CreateUsers implements SeedsInterface {
300+
301+ public async seed(factory : FactoryInterface ): Promise <any > {
302+ await factory
303+ .get (User , ' admin' )
290304 .create (1 );
291305 }
292306
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export interface FactoryInterface {
99 /**
1010 * Returns an EntityFactoryInterface
1111 */
12- get < Entity > ( entityClass : ObjectType < Entity > ) : EntityFactoryInterface < Entity > ;
12+ get < Entity > ( entityClass : ObjectType < Entity > , args : any [ ] ) : EntityFactoryInterface < Entity > ;
1313 /**
1414 * Define an entity faker
1515 */
You can’t perform that action at this time.
0 commit comments