Skip to content

Commit

Permalink
Simplify school entity mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedwiper committed Nov 2, 2023
1 parent 21e8116 commit a5fa5a5
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,13 @@ export class SchoolEntityMapper {
const systems = entity.systems?.getItems().map((system) => SystemEntityMapper.mapToDo(system));

const school = new School({
...entity,
// id needs to be mapped explicitly because it exists only virtually in the entity
id: entity.id,
name: entity.name,
officialSchoolNumber: entity.officialSchoolNumber,
externalId: entity.externalId,
previousExternalId: entity.previousExternalId,
inMaintenanceSince: entity.inMaintenanceSince,
inUserMigration: entity.inUserMigration,
currentYear,
federalState,
county: entity.county,
purpose: entity.purpose,
features,
systems,
logo_dataUrl: entity.logo_dataUrl,
fileStorageType: entity.fileStorageType,
});

return school;
Expand Down

0 comments on commit a5fa5a5

Please sign in to comment.