-
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] Admin 공유일정 수정 API 및 테스트 코드 작성 #1059 #1086
Merged
The head ref may contain hidden characters: "1059-feature-admin-\uACF5\uC720\uC77C\uC815-\uC218\uC815"
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
60 changes: 60 additions & 0 deletions
60
...api/admin/schedule/publicschedule/controller/request/PublicScheduleAdminUpdateReqDto.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,71 @@ | ||
package gg.calendar.api.admin.schedule.publicschedule.controller.request; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Size; | ||
|
||
import org.springframework.format.annotation.DateTimeFormat; | ||
|
||
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 PublicScheduleAdminUpdateReqDto { | ||
|
||
@NotNull | ||
private DetailClassification classification; | ||
|
||
private EventTag eventTag; | ||
|
||
private JobTag jobTag; | ||
|
||
private TechTag techTag; | ||
|
||
@NotBlank | ||
@Size(max = 50, message = "제목은 50자이하로 입력해주세요.") | ||
private String title; | ||
|
||
@Size(max = 2000, message = "내용은 2000자이하로 입력해주세요.") | ||
private String content; | ||
|
||
private String link; | ||
|
||
@NotNull | ||
private ScheduleStatus status; | ||
|
||
@NotNull | ||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) | ||
private LocalDateTime startTime; | ||
|
||
@NotNull | ||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) | ||
private LocalDateTime endTime; | ||
|
||
@Builder | ||
private PublicScheduleAdminUpdateReqDto(DetailClassification classification, EventTag eventTag, JobTag jobTag, | ||
TechTag techTag, String title, String content, String link, ScheduleStatus status, LocalDateTime startTime, | ||
LocalDateTime endTime) { | ||
|
||
this.classification = classification; | ||
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; | ||
|
||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
...pi/admin/schedule/publicschedule/controller/response/PublicScheduleAdminUpdateResDto.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,83 @@ | ||
package gg.calendar.api.admin.schedule.publicschedule.controller.response; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import gg.data.calendar.PublicSchedule; | ||
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 PublicScheduleAdminUpdateResDto { | ||
|
||
private Long id; | ||
|
||
private String classification; | ||
|
||
private EventTag eventTag; | ||
|
||
private JobTag jobTag; | ||
|
||
private TechTag techTag; | ||
|
||
private String author; | ||
|
||
private String title; | ||
|
||
private String content; | ||
|
||
private String link; | ||
|
||
private Integer sharedCount; | ||
|
||
private ScheduleStatus status; | ||
|
||
private LocalDateTime startTime; | ||
|
||
private LocalDateTime endTime; | ||
|
||
@Builder | ||
private PublicScheduleAdminUpdateResDto(Long id, String classification, EventTag eventTag, JobTag jobTag, | ||
TechTag techTag, | ||
String author, String title, String content, String link, Integer sharedCount, ScheduleStatus status, | ||
LocalDateTime startTime, LocalDateTime endTime) { | ||
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.sharedCount = sharedCount; | ||
this.status = status; | ||
this.startTime = startTime; | ||
this.endTime = endTime; | ||
|
||
} | ||
|
||
public static PublicScheduleAdminUpdateResDto toDto(PublicSchedule publicSchedule) { | ||
return PublicScheduleAdminUpdateResDto.builder() | ||
.id(publicSchedule.getId()) | ||
.classification(publicSchedule.getClassification().name()) | ||
.eventTag(publicSchedule.getEventTag()) | ||
.jobTag(publicSchedule.getJobTag()) | ||
.techTag(publicSchedule.getTechTag()) | ||
.author(publicSchedule.getAuthor()) | ||
.title(publicSchedule.getTitle()) | ||
.content(publicSchedule.getContent()) | ||
.link(publicSchedule.getLink()) | ||
.sharedCount(publicSchedule.getSharedCount()) | ||
.status(publicSchedule.getStatus()) | ||
.startTime(publicSchedule.getStartTime()) | ||
.endTime(publicSchedule.getEndTime()) | ||
.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.
벌써 정렬까지 대단하십니다.