-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: wonie <wonies@github.com>
- Loading branch information
Showing
14 changed files
with
553 additions
and
62 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
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
11 changes: 0 additions & 11 deletions
11
...gg/calendar/api/user/schedule/publicschedule/controller/request/PublicScheduleReqDto.java
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
...endar/api/user/schedule/publicschedule/controller/request/PublicScheduleUpdateReqDto.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,51 @@ | ||
package gg.calendar.api.user.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.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class PublicScheduleUpdateReqDto { | ||
@NotNull | ||
private DetailClassification classification; | ||
private EventTag eventTag; | ||
private JobTag jobTag; | ||
private TechTag techTag; | ||
@NotBlank | ||
private String author; | ||
|
||
@NotBlank | ||
@Size(max = 50, message = "제목은 50자이하로 입력해주세요.") | ||
private String title; | ||
|
||
@Size(max = 2000, message = "내용은 2000자이하로 입력해주세요.") | ||
private String content; | ||
private String link; | ||
|
||
@NotNull | ||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) | ||
private LocalDateTime startTime; | ||
|
||
@NotNull | ||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) | ||
private LocalDateTime endTime; | ||
private ScheduleStatus status; | ||
} |
4 changes: 0 additions & 4 deletions
4
...g/calendar/api/user/schedule/publicschedule/controller/response/PublicScheduleResDto.java
This file was deleted.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
...ndar/api/user/schedule/publicschedule/controller/response/PublicScheduleUpdateResDto.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,63 @@ | ||
package gg.calendar.api.user.schedule.publicschedule.controller.response; | ||
|
||
import gg.data.calendar.PublicSchedule; | ||
import gg.data.calendar.type.DetailClassification; | ||
import gg.data.calendar.type.EventTag; | ||
import gg.data.calendar.type.JobTag; | ||
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 PublicScheduleUpdateResDto { | ||
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 String startTime; | ||
private String endTime; | ||
private String status; | ||
|
||
@Builder | ||
private PublicScheduleUpdateResDto(Long id, DetailClassification classification, EventTag eventTag, JobTag jobTag, | ||
TechTag techTag, String author, String title, String content, String link, String startTime, String endTime, | ||
String status) { | ||
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.startTime = startTime; | ||
this.endTime = endTime; | ||
this.status = status; | ||
} | ||
|
||
public static PublicScheduleUpdateResDto toDto(PublicSchedule publicSchedule) { | ||
return PublicScheduleUpdateResDto.builder() | ||
.id(publicSchedule.getId()) | ||
.classification(publicSchedule.getClassification()) | ||
.eventTag(publicSchedule.getEventTag()) | ||
.jobTag(publicSchedule.getJobTag()) | ||
.techTag(publicSchedule.getTechTag()) | ||
.author(publicSchedule.getAuthor()) | ||
.title(publicSchedule.getTitle()) | ||
.content(publicSchedule.getContent()) | ||
.link(publicSchedule.getLink()) | ||
.startTime(publicSchedule.getStartTime().toString()) | ||
.endTime(publicSchedule.getEndTime().toString()) | ||
.status(publicSchedule.getStatus().name()) | ||
.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.