-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEventAttachmentService.java
More file actions
40 lines (40 loc) · 1.52 KB
/
EventAttachmentService.java
File metadata and controls
40 lines (40 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//package life.mosu.mosuserver.application.event;
//
//import java.util.List;
//import life.mosu.mosuserver.domain.event.EventAttachmentRepository;
//import life.mosu.mosuserver.domain.event.entity.EventJpaEntity;
//import life.mosu.mosuserver.infra.persistence.s3.AttachmentService;
//import life.mosu.mosuserver.infra.persistence.s3.FileUploadHelper;
//import life.mosu.mosuserver.presentation.common.FileRequest;
//import lombok.RequiredArgsConstructor;
//import org.springframework.stereotype.Service;
//
//@Service
//@RequiredArgsConstructor
//public class EventAttachmentService implements AttachmentService<EventJpaEntity, FileRequest> {
//
// private final EventAttachmentRepository eventAttachmentRepository;
// private final FileUploadHelper fileUploadHelper;
//
// @Override
// public void createAttachment(List<FileRequest> request, EventJpaEntity eventEntity) {
// if (request == null || request.isEmpty()) {
// return;
// }
// fileUploadHelper.saveAttachments(
// request,
// eventEntity.getId(),
// eventAttachmentRepository,
// (fileRequest, eventId) -> fileRequest.toEventAttachmentEntity(eventEntity.getId()),
// FileRequest::s3Key
// );
// }
//
// @Override
// public void deleteAttachment(EventJpaEntity entity) {
// if (eventAttachmentRepository.findByEventId(entity.getId()).isPresent()) {
// eventAttachmentRepository.deleteByEventId(entity.getId());
// }
// }
//
//}