Skip to content

Commit

Permalink
[fix] 스케쥴 반환 API 스펙 변경(id를 최상단에 반환)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeonHaeseung committed Apr 14, 2024
1 parent 7a11464 commit d71d99a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public GetOneMonthSchedulesDto getOneMonthUserSchedule(Long id, String date){
// ScheduleListResponseDto에 매핑
List<GetScheduleDto> getScheduleDtos = scheduleList.stream()
.map(schedule -> GetScheduleDto.builder()
.id(schedule.getId())
.category(schedule.getCategory().getName())
.categoryNum(schedule.getCategory().getId())
.info(schedule.getInfo())
.startTime(schedule.getStartTime())
.endTime(schedule.getEndTime())
.details(GetScheduleDetailDto.builder()
.id(schedule.getId())
.person(schedule.getPerson())
.location(schedule.getLocation())
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
@Data
@NoArgsConstructor
public class GetScheduleDetailDto {
@Schema(description = "스케쥴 고유 인식 넘버", example = "0")
private Long id;

@Schema(description = "스케쥴 위치", example = "이화여대 ECC")
private String location;

@Schema(description = "스케쥴 사람", example = "홍길동")
private String person;

@Builder
public GetScheduleDetailDto(Long id, String location, String person){
this.id = id;
public GetScheduleDetailDto(String location, String person){
this.location = location;
this.person = person;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
@Data
@NoArgsConstructor
public class GetScheduleDto {
@Schema(description = "스케쥴 고유 인식 넘버", example = "0")
private Long id;

@Schema(description = "스케쥴 텍스트 내용", example = "AI 공부")
@JsonProperty("title")
private String info;
Expand All @@ -36,7 +39,10 @@ public class GetScheduleDto {
private GetScheduleDetailDto details;

@Builder
public GetScheduleDto(String category, Long categoryNum, String info, ZonedDateTime startTime, ZonedDateTime endTime, GetScheduleDetailDto details){
public GetScheduleDto(Long id, String category, Long categoryNum,
String info, ZonedDateTime startTime, ZonedDateTime endTime,
GetScheduleDetailDto details){
this.id = id;
this.category = category;
this.categoryNum = categoryNum;
this.info = info;
Expand Down

0 comments on commit d71d99a

Please sign in to comment.