class FrontendLogMapper implements DataMapper<FrontendLog, FrontendLogDto> {

  @Override
  public FrontendLogDto mapEntityToDto(FrontendLog frontendLog) {
    FrontendLogDto frontendLogDto = new FrontendLogDto();
    frontendLogDto.setId(frontendLog.getId());
    frontendLogDto.setLevel(
        String.valueOf(FrontendLogLevel.valueOf(frontendLog.getLevel()).getLevelId()));
    frontendLogDto.setTimestamp(frontendLog.getTimestamp().format(dateTimeFormatter));
    frontendLogDto.setFileName(frontendLog.getFileName());
    frontendLogDto.setLineNumber(frontendLog.getLineNumber());
    frontendLogDto.setMessage(frontendLog.getMessage());

    return frontendLogDto;
  }

}