diff --git a/src/main/java/Ness/Backend/domain/schedule/ScheduleService.java b/src/main/java/Ness/Backend/domain/schedule/ScheduleService.java index c8d73f8..a8e0fe3 100644 --- a/src/main/java/Ness/Backend/domain/schedule/ScheduleService.java +++ b/src/main/java/Ness/Backend/domain/schedule/ScheduleService.java @@ -44,13 +44,13 @@ public GetOneMonthSchedulesDto getOneMonthUserSchedule(Long id, String date){ // ScheduleListResponseDto에 매핑 List 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()) diff --git a/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDetailDto.java b/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDetailDto.java index 6614192..ddc4e17 100644 --- a/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDetailDto.java +++ b/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDetailDto.java @@ -9,9 +9,6 @@ @Data @NoArgsConstructor public class GetScheduleDetailDto { - @Schema(description = "스케쥴 고유 인식 넘버", example = "0") - private Long id; - @Schema(description = "스케쥴 위치", example = "이화여대 ECC") private String location; @@ -19,8 +16,7 @@ public class GetScheduleDetailDto { 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; } diff --git a/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDto.java b/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDto.java index 52719f6..8a47e29 100644 --- a/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDto.java +++ b/src/main/java/Ness/Backend/domain/schedule/dto/response/GetScheduleDto.java @@ -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; @@ -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;