class ActivityLogServiceImpl implements ActivityLogService {

    @Override
    public void recordActivityByProjectId(long projectId, ActivityType activityType) {
        projectRepository.findById(projectId)
                .ifPresent(project -> {
                    ActivityLog log = new ActivityLog(project.getApplication(), activityType);
                    activityLogRepository.save(log);
                });
    }

}