Package inha.git.notice.api.mapper
Interface NoticeMapper
public interface NoticeMapper
NoticeMapper는 Notice 엔티티와 관련된 데이터 변환 기능을 제공.
-
Method Summary
Modifier and TypeMethodDescriptioncreateNoticeAttachmentRequestToNoticeAttachment
(String originalFileName, String storedFileUrl, Notice notice) CreateNoticeRequest를 Notice 엔티티로 변환createNoticeRequestToNotice
(User user, CreateNoticeRequest createNoticeRequest) CreateNoticeRequest를 Notice 엔티티로 변환noticeAttachmentToSearchNoticeAttachmentResponse
(NoticeAttachment noticeAttachment) noticeToSearchNoticeResponse
(Notice notice, SearchNoticeUserResponse author, List<SearchNoticeAttachmentResponse> attachment) Notice를 SearchNoticeResponse로 변환User를 SearchNoticeUserResponse로 변환
-
Method Details
-
createNoticeRequestToNotice
CreateNoticeRequest를 Notice 엔티티로 변환- Parameters:
user
- 사용자createNoticeRequest
- 공지 생성 요청- Returns:
- Notice 엔티티
-
noticeToSearchNoticeResponse
SearchNoticeResponse noticeToSearchNoticeResponse(Notice notice, SearchNoticeUserResponse author, List<SearchNoticeAttachmentResponse> attachment) Notice를 SearchNoticeResponse로 변환- Parameters:
notice
- 공지author
- 작성자- Returns:
- SearchNoticeResponse
-
noticeAttachmentToSearchNoticeAttachmentResponse
SearchNoticeAttachmentResponse noticeAttachmentToSearchNoticeAttachmentResponse(NoticeAttachment noticeAttachment) -
userToSearchNoticeUserResponse
User를 SearchNoticeUserResponse로 변환- Parameters:
user
- 사용자- Returns:
- SearchNoticeUserResponse
-
createNoticeAttachmentRequestToNoticeAttachment
NoticeAttachment createNoticeAttachmentRequestToNoticeAttachment(String originalFileName, String storedFileUrl, Notice notice) CreateNoticeRequest를 Notice 엔티티로 변환- Parameters:
originalFileName
- 원본 파일 이름storedFileUrl
- 저장된 파일 URL- Returns:
- NoticeAttachment 엔티티
-