class UserSettingsMapper implements DataMapper<UserSettings, UserSettingsDto> {

  @Override
  public UserSettings mapDtoToEntity(UserSettingsDto dto) {
    UserSettings entity = new UserSettings();
    entity.setId(dto.getId());
    if (dto.getDefaultCompanyId() != null) {
      OkrCompany mockOkrCompany = new OkrCompany();
      mockOkrCompany.setId(dto.getDefaultCompanyId());
      entity.setDefaultOkrCompany(mockOkrCompany);
    }
    if (dto.getDefaultTeamId() != null) {
      OkrDepartment mockOkrDepartment = new OkrDepartment();
      mockOkrDepartment.setId(dto.getDefaultTeamId());
      entity.setDefaultTeam(mockOkrDepartment);
    }
    return entity;
  }

}