diff --git a/src/query/core/entity-config-resolver.ts b/src/query/core/entity-config-resolver.ts index 87702cf..a3ed824 100644 --- a/src/query/core/entity-config-resolver.ts +++ b/src/query/core/entity-config-resolver.ts @@ -1,6 +1,10 @@ import { IEntityConfigResolver } from './entity-config-resolver.interface'; import { map, Observable } from 'rxjs'; -import { Entity, EntityAttribute, EntityConfig } from '../domain/EntityConfig'; +import { + EntityAttribute, + EntityConfig, + EntityType, +} from '../domain/EntityConfig'; import { CouchDbClient } from '../../couchdb/couch-db-client.service'; export interface AppConfigFile { @@ -39,7 +43,7 @@ export class EntityConfigResolver implements IEntityConfigResolver { const keys = Object.keys(config.data).filter((key) => key.startsWith('entity:'), ); - const entities: Entity[] = []; + const entities: EntityType[] = []; for (let i = 0; i < keys.length; i++) { entities.push(this.parseEntityConfig(keys[i], config)); } @@ -48,7 +52,10 @@ export class EntityConfigResolver implements IEntityConfigResolver { ); } - private parseEntityConfig(entityKey: string, config: AppConfigFile): Entity { + private parseEntityConfig( + entityKey: string, + config: AppConfigFile, + ): EntityType { const data = config.data[entityKey]; let label: string; @@ -67,6 +74,6 @@ export class EntityConfigResolver implements IEntityConfigResolver { ), ); - return new Entity(label, attributes); + return new EntityType(label, attributes); } } diff --git a/src/query/domain/EntityConfig.ts b/src/query/domain/EntityConfig.ts index e4de90c..36316b6 100644 --- a/src/query/domain/EntityConfig.ts +++ b/src/query/domain/EntityConfig.ts @@ -5,7 +5,7 @@ export class EntityAttribute { ) {} } -export class Entity { +export class EntityType { constructor( public label: string, public attributes: EntityAttribute[], @@ -15,6 +15,6 @@ export class Entity { export class EntityConfig { constructor( public version: string, - public entities: Entity[], + public entities: EntityType[], ) {} }