Renamed files and classed from *Organisation* to *Organization*📝
ref #117
This commit is contained in:
@@ -2,13 +2,13 @@ import { Connection } from 'typeorm';
|
||||
import { Factory, Seeder } from 'typeorm-seeding';
|
||||
import { CreateGroupContact } from '../models/actions/create/CreateGroupContact';
|
||||
import { CreateRunner } from '../models/actions/create/CreateRunner';
|
||||
import { CreateRunnerOrganisation } from '../models/actions/create/CreateRunnerOrganisation';
|
||||
import { CreateRunnerOrganization } from '../models/actions/create/CreateRunnerOrganization';
|
||||
import { CreateRunnerTeam } from '../models/actions/create/CreateRunnerTeam';
|
||||
import { Address } from '../models/entities/Address';
|
||||
import { GroupContact } from '../models/entities/GroupContact';
|
||||
import { Runner } from '../models/entities/Runner';
|
||||
import { RunnerGroup } from '../models/entities/RunnerGroup';
|
||||
import { RunnerOrganisation } from '../models/entities/RunnerOrganisation';
|
||||
import { RunnerOrganization } from '../models/entities/RunnerOrganization';
|
||||
import { RunnerTeam } from '../models/entities/RunnerTeam';
|
||||
|
||||
/**
|
||||
@@ -17,15 +17,15 @@ import { RunnerTeam } from '../models/entities/RunnerTeam';
|
||||
*/
|
||||
export default class SeedTestRunners implements Seeder {
|
||||
public async run(factory: Factory, connection: Connection): Promise<any> {
|
||||
let testOrg: RunnerOrganisation = await this.createTestOrg(connection);
|
||||
let testOrg: RunnerOrganization = await this.createTestOrg(connection);
|
||||
let testTeam: RunnerTeam = await this.createTestTeam(connection, testOrg);
|
||||
await this.createTestContact(connection, testOrg);
|
||||
await this.createTestRunners(connection, testOrg);
|
||||
await this.createTestRunners(connection, testTeam);
|
||||
}
|
||||
|
||||
public async createTestOrg(connection: Connection): Promise<RunnerOrganisation> {
|
||||
let testOrg = new CreateRunnerOrganisation();
|
||||
public async createTestOrg(connection: Connection): Promise<RunnerOrganization> {
|
||||
let testOrg = new CreateRunnerOrganization();
|
||||
testOrg.name = "Test Org";
|
||||
|
||||
testOrg.address = new Address();
|
||||
@@ -34,10 +34,10 @@ export default class SeedTestRunners implements Seeder {
|
||||
testOrg.address.country = "Germany";
|
||||
testOrg.address.postalcode = "90174";
|
||||
|
||||
return await connection.getRepository(RunnerOrganisation).save(await testOrg.toEntity());
|
||||
return await connection.getRepository(RunnerOrganization).save(await testOrg.toEntity());
|
||||
}
|
||||
|
||||
public async createTestTeam(connection: Connection, org: RunnerOrganisation): Promise<RunnerTeam> {
|
||||
public async createTestTeam(connection: Connection, org: RunnerOrganization): Promise<RunnerTeam> {
|
||||
let testTeam = new CreateRunnerTeam();
|
||||
testTeam.name = "Test Team";
|
||||
testTeam.parentGroup = org.id;
|
||||
|
||||
Reference in New Issue
Block a user