-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ [Feature] 개인일정 수정 api #1057 #1087
Merged
The head ref may contain hidden characters: "1057-feature-\uAC1C\uC778\uC77C\uC815-\uC218\uC815-api"
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e8926f4
✨ [Feature] 개인일정 수정 API DTO 작성 #1057
f117591
✨ [Feature] 개인일정 수정 API PrivateSchedule 수정 메서드 추가 #1057
d754767
✨ [Feature] 개인일정 수정 API author 검증 로직 추가 #1057
9351a15
✨ [Feature] 개인일정 수정 API Controller 수정 메서드 추가 #1057
167e383
🧪 [Test] 개인일정 수정 API 테스트 추가 #1057
0abf0a8
Merge branch 'dev' into 1057-feature-개인일정-수정-api
taehyeon3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
56 changes: 56 additions & 0 deletions
56
...dar/api/user/schedule/privateschedule/controller/request/PrivateScheduleUpdateReqDto.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 |
---|---|---|
@@ -1,10 +1,66 @@ | ||
package gg.calendar.api.user.schedule.privateschedule.controller.request; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Size; | ||
|
||
import gg.data.calendar.type.EventTag; | ||
import gg.data.calendar.type.JobTag; | ||
import gg.data.calendar.type.ScheduleStatus; | ||
import gg.data.calendar.type.TechTag; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class PrivateScheduleUpdateReqDto { | ||
private EventTag eventTag; | ||
|
||
private JobTag jobTag; | ||
|
||
private TechTag techTag; | ||
|
||
@NotBlank | ||
@Size(max = 50) | ||
private String title; | ||
|
||
@Size(max = 2000) | ||
private String content; | ||
|
||
private String link; | ||
|
||
@NotNull | ||
private ScheduleStatus status; | ||
|
||
@NotNull | ||
private LocalDateTime startTime; | ||
|
||
@NotNull | ||
private LocalDateTime endTime; | ||
|
||
@NotNull | ||
private boolean alarm; | ||
|
||
@NotNull | ||
private Long groupId; | ||
|
||
@Builder | ||
public PrivateScheduleUpdateReqDto(EventTag eventTag, JobTag jobTag, TechTag techTag, String title, String content, | ||
String link, ScheduleStatus status, LocalDateTime startTime, LocalDateTime endTime, boolean alarm, | ||
Long groupId) { | ||
this.eventTag = eventTag; | ||
this.jobTag = jobTag; | ||
this.techTag = techTag; | ||
this.title = title; | ||
this.content = content; | ||
this.link = link; | ||
this.status = status; | ||
this.startTime = startTime; | ||
this.endTime = endTime; | ||
this.alarm = alarm; | ||
this.groupId = groupId; | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
...ar/api/user/schedule/privateschedule/controller/response/PrivateScheduleUpdateResDto.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 |
---|---|---|
@@ -1,11 +1,85 @@ | ||
package gg.calendar.api.user.schedule.privateschedule.controller.response; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import gg.data.calendar.PrivateSchedule; | ||
import gg.data.calendar.type.DetailClassification; | ||
import gg.data.calendar.type.EventTag; | ||
import gg.data.calendar.type.JobTag; | ||
import gg.data.calendar.type.ScheduleStatus; | ||
import gg.data.calendar.type.TechTag; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class PrivateScheduleUpdateResDto { | ||
private Long id; | ||
|
||
private DetailClassification classification; | ||
|
||
private EventTag eventTag; | ||
|
||
private JobTag jobTag; | ||
|
||
private TechTag techTag; | ||
|
||
private String author; | ||
|
||
private String title; | ||
|
||
private String content; | ||
|
||
private String link; | ||
|
||
private ScheduleStatus status; | ||
|
||
private LocalDateTime startTime; | ||
|
||
private LocalDateTime endTime; | ||
|
||
private boolean alarm; | ||
|
||
private Long groupId; | ||
|
||
@Builder | ||
private PrivateScheduleUpdateResDto(Long id, DetailClassification classification, EventTag eventTag, JobTag jobTag, | ||
TechTag techTag, String author, String title, String content, String link, ScheduleStatus status, | ||
LocalDateTime startTime, LocalDateTime endTime, boolean alarm, Long groupId) { | ||
this.id = id; | ||
this.classification = classification; | ||
this.eventTag = eventTag; | ||
this.jobTag = jobTag; | ||
this.techTag = techTag; | ||
this.author = author; | ||
this.title = title; | ||
this.content = content; | ||
this.link = link; | ||
this.status = status; | ||
this.startTime = startTime; | ||
this.endTime = endTime; | ||
this.alarm = alarm; | ||
this.groupId = groupId; | ||
} | ||
|
||
public static PrivateScheduleUpdateResDto toDto(PrivateSchedule privateSchedule) { | ||
return PrivateScheduleUpdateResDto.builder() | ||
.id(privateSchedule.getId()) | ||
.classification(privateSchedule.getPublicSchedule().getClassification()) | ||
.eventTag(privateSchedule.getPublicSchedule().getEventTag()) | ||
.jobTag(privateSchedule.getPublicSchedule().getJobTag()) | ||
.techTag(privateSchedule.getPublicSchedule().getTechTag()) | ||
.author(privateSchedule.getPublicSchedule().getAuthor()) | ||
.title(privateSchedule.getPublicSchedule().getTitle()) | ||
.content(privateSchedule.getPublicSchedule().getContent()) | ||
.link(privateSchedule.getPublicSchedule().getLink()) | ||
.status(privateSchedule.getStatus()) | ||
.startTime(privateSchedule.getPublicSchedule().getStartTime()) | ||
.endTime(privateSchedule.getPublicSchedule().getEndTime()) | ||
.alarm(privateSchedule.isAlarm()) | ||
.groupId(privateSchedule.getGroupId()) | ||
.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
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@builder가 들어간 생성자의 타입을 private으로 통일하기로 해서 수정요청드립니다!