Skip to content

Commit

Permalink
[HotFix] add teamName in schedule detail response dto
Browse files Browse the repository at this point in the history
  • Loading branch information
Han-Jeong committed May 29, 2024
1 parent 1c498f0 commit 89892c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import com.example.waggle.domain.member.presentation.converter.MemberConverter;
import com.example.waggle.domain.schedule.persistence.entity.Schedule;
import com.example.waggle.global.util.ScheduleUtil;
import com.example.waggle.domain.schedule.persistence.entity.Team;
import com.example.waggle.domain.schedule.presentation.dto.schedule.ScheduleResponse;
import com.example.waggle.domain.schedule.presentation.dto.schedule.ScheduleResponse.OverlappedScheduleDto;
import com.example.waggle.domain.schedule.presentation.dto.schedule.ScheduleResponse.ScheduleDetailDto;
import com.example.waggle.domain.schedule.presentation.dto.schedule.ScheduleResponse.ScheduleListDto;
import com.example.waggle.global.util.ScheduleUtil;
import org.springframework.data.domain.Page;

import java.time.LocalDateTime;
Expand All @@ -17,10 +18,12 @@
public class ScheduleConverter {

public static ScheduleDetailDto toScheduleDetailDto(Schedule schedule) {
Team team = schedule.getTeam();
return ScheduleDetailDto.builder()
.boardId(schedule.getId())
.teamId(schedule.getTeam().getId())
.teamColor(schedule.getTeam().getTeamColor())
.teamId(team.getId())
.teamColor(team.getTeamColor())
.teamName(team.getName())
.title(schedule.getTitle())
.content(schedule.getContent())
.startDate(LocalDateTime.of(schedule.getStartDate(), schedule.getStartTime()))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.example.waggle.domain.schedule.presentation.dto.schedule;

import com.example.waggle.domain.member.presentation.dto.MemberResponse.MemberSummaryDto;
import com.example.waggle.domain.schedule.persistence.entity.ScheduleStatus;
import com.example.waggle.domain.schedule.persistence.entity.TeamColor;
import com.example.waggle.domain.member.presentation.dto.MemberResponse.MemberSummaryDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -35,6 +35,7 @@ public static class ScheduleDetailDto {
private Long boardId;
private Long teamId;
private TeamColor teamColor;
private String teamName;
private String title;
private String content;
private LocalDateTime startDate;
Expand Down

0 comments on commit 89892c1

Please sign in to comment.