parent
1837336865
commit
2db6510a8a
15
src/seeds/SeedPublicOrg.ts
Normal file
15
src/seeds/SeedPublicOrg.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { Connection } from 'typeorm';
|
||||||
|
import { Factory, Seeder } from 'typeorm-seeding';
|
||||||
|
import { CreateRunnerOrganisation } from '../models/actions/create/CreateRunnerOrganisation';
|
||||||
|
import { RunnerOrganisation } from '../models/entities/RunnerOrganisation';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Seeds the public runner org (named: "Citizen" by default).
|
||||||
|
*/
|
||||||
|
export default class SeedPublicOrg implements Seeder {
|
||||||
|
public async run(factory: Factory, connection: Connection): Promise<any> {
|
||||||
|
let publicOrg = new CreateRunnerOrganisation();
|
||||||
|
publicOrg.name = "Citizen";
|
||||||
|
await connection.getRepository(RunnerOrganisation).save(await publicOrg.toEntity());
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user