-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from Team-Smeme/sohyeon_#198
[REFACTOR] 1차 기능 리팩토링
- Loading branch information
Showing
61 changed files
with
805 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,8 @@ allprojects { | |
tasks.named('test') { | ||
useJUnitPlatform() | ||
} | ||
} | ||
} | ||
|
||
jar { enabled = true } | ||
|
||
bootJar { enabled = false } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
...pi/src/main/java/com/smeem/api/diary/controller/dto/response/CreatedDiaryResponseDTO.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
smeem-api/src/main/java/com/smeem/api/diary/controller/dto/response/DiariesResponseDTO.java
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...ntroller/dto/request/DiaryRequestDTO.java → ...diary/dto/request/DiaryCreateRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
smeem-api/src/main/java/com/smeem/api/diary/dto/request/DiaryCreateServiceRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.smeem.api.diary.dto.request; | ||
|
||
import lombok.Builder; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
@Builder(access = PRIVATE) | ||
public record DiaryCreateServiceRequest( | ||
long memberId, | ||
String content, | ||
Long topicId | ||
) { | ||
|
||
public static DiaryCreateServiceRequest of(long memberId, DiaryCreateRequest request) { | ||
return DiaryCreateServiceRequest.builder() | ||
.memberId(memberId) | ||
.content(request.content()) | ||
.topicId(request.topicId()) | ||
.build(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
smeem-api/src/main/java/com/smeem/api/diary/dto/request/DiaryDeleteServiceRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.smeem.api.diary.dto.request; | ||
|
||
import lombok.Builder; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
@Builder(access = PRIVATE) | ||
public record DiaryDeleteServiceRequest( | ||
long diaryId | ||
) { | ||
|
||
public static DiaryDeleteServiceRequest of(long diaryId) { | ||
return DiaryDeleteServiceRequest.builder() | ||
.diaryId(diaryId) | ||
.build(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
smeem-api/src/main/java/com/smeem/api/diary/dto/request/DiaryGetServiceRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.smeem.api.diary.dto.request; | ||
|
||
import lombok.Builder; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
@Builder(access = PRIVATE) | ||
public record DiaryGetServiceRequest( | ||
long diaryId | ||
) { | ||
|
||
public static DiaryGetServiceRequest of(long diaryId) { | ||
return DiaryGetServiceRequest.builder() | ||
.diaryId(diaryId) | ||
.build(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
smeem-api/src/main/java/com/smeem/api/diary/dto/request/DiaryListGetServiceRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.smeem.api.diary.dto.request; | ||
|
||
import lombok.Builder; | ||
|
||
import java.time.LocalDate; | ||
|
||
import static java.time.format.DateTimeFormatter.ISO_DATE; | ||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
@Builder(access = PRIVATE) | ||
public record DiaryListGetServiceRequest( | ||
long memberId, | ||
LocalDate startDate, | ||
LocalDate endDate | ||
) { | ||
|
||
public static DiaryListGetServiceRequest of(long memberId, String startDate, String endDate) { | ||
return DiaryListGetServiceRequest.builder() | ||
.memberId(memberId) | ||
.startDate(LocalDate.parse(startDate, ISO_DATE)) | ||
.endDate(LocalDate.parse(endDate, ISO_DATE)) | ||
.build(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
smeem-api/src/main/java/com/smeem/api/diary/dto/request/DiaryModifyRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.smeem.api.diary.dto.request; | ||
|
||
import lombok.NonNull; | ||
|
||
public record DiaryModifyRequest( | ||
@NonNull | ||
String content, | ||
Long topicId | ||
) { | ||
} |
19 changes: 19 additions & 0 deletions
19
smeem-api/src/main/java/com/smeem/api/diary/dto/request/DiaryModifyServiceRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.smeem.api.diary.dto.request; | ||
|
||
import lombok.Builder; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
@Builder(access = PRIVATE) | ||
public record DiaryModifyServiceRequest( | ||
long diaryId, | ||
String content | ||
) { | ||
|
||
public static DiaryModifyServiceRequest of(long diaryId, DiaryModifyRequest request) { | ||
return DiaryModifyServiceRequest.builder() | ||
.diaryId(diaryId) | ||
.content(request.content()) | ||
.build(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
smeem-api/src/main/java/com/smeem/api/diary/dto/response/DiaryCreateServiceResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.smeem.api.diary.dto.response; | ||
|
||
import com.smeem.api.badge.controller.dto.response.AcquiredBadgeResponseDTO; | ||
import com.smeem.domain.badge.model.Badge; | ||
import com.smeem.domain.diary.model.Diary; | ||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
@Builder(access = PRIVATE) | ||
public record DiaryCreateServiceResponse( | ||
long diaryId, | ||
List<AcquiredBadgeResponseDTO> badges | ||
) { | ||
public static DiaryCreateServiceResponse of(Diary diary, List<Badge> badges) { | ||
return DiaryCreateServiceResponse.builder() | ||
.diaryId(diary.getId()) | ||
.badges(badges.stream().map(AcquiredBadgeResponseDTO::of).toList()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.