Skip to content
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

[release] v1.2.0 릴리즈 #155

Merged
merged 79 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
51fe7e5
feat: 여행 정보 수정 service 구현 (#124)
gardening-y Feb 28, 2024
f2dc0c6
feat: 여행 정보 수정 api controller 구현 (#124)
gardening-y Feb 28, 2024
4a830ff
feat: trip update 메서드 구현 (#124)
gardening-y Feb 28, 2024
f159226
feat: 여행 정보 수정 request dto 구현 (#124)
gardening-y Feb 28, 2024
cd4e477
feat: 참여자 관련 상수 추가 (#123)
SunwoongH Feb 29, 2024
a757026
feat: 참여자 조회 쿼리 추가 (#123)
SunwoongH Feb 29, 2024
7b48732
feat: 혼자 할일 조회 쿼리 추가 (#123)
SunwoongH Feb 29, 2024
7d71549
chore: 메서드명 변경 사항 반영 (#123)
SunwoongH Feb 29, 2024
2dd5d20
feat: 여행 나가기 비즈니스 로직 구현 (#123)
SunwoongH Feb 29, 2024
cdf094f
feat: 여행 나가기 API 구현 (#123)
SunwoongH Feb 29, 2024
e0bd1be
Merge pull request #125 from Team-Going/feature/124
gardening-y Feb 29, 2024
510d416
feat: 프로필 수정 api 구현 (#127)
gardening-y Feb 29, 2024
4448c12
feat: 프로필 수정 비즈니스 로직 구현 (#127)
gardening-y Feb 29, 2024
16f98ac
feat: 프로필 수정 request dto 구현 (#127)
gardening-y Feb 29, 2024
14726f5
Revert "feat: 프로필 수정 request dto 구현 (#127)"
gardening-y Feb 29, 2024
60ea320
feat: 프로필 수정 request dto 구현 (#127)
gardening-y Feb 29, 2024
2d41fe2
feat: user update 메서드 구현 (#127)
gardening-y Feb 29, 2024
69f4d80
Merge branch 'develop' into feature/123
SunwoongH Mar 1, 2024
dc8c5ee
chore: 코드 충돌 해결 (#123)
SunwoongH Mar 1, 2024
3093301
Merge pull request #126 from Team-Going/feature/123
SunwoongH Mar 1, 2024
fcce46c
fix: 여행 나가기 API 요청 경로 수정 (#129)
SunwoongH Mar 1, 2024
37c01b8
Merge pull request #128 from Team-Going/feature/127
gardening-y Mar 1, 2024
4c1912f
Merge pull request #130 from Team-Going/feature/129
SunwoongH Mar 1, 2024
1b649ba
feat: participant update 메서드 구현 (#131)
gardening-y Mar 2, 2024
711b050
feat: 여행 성향 테스트 수정 api 구현 (#131)
gardening-y Mar 2, 2024
b4c66f8
feat: 여행 성향 테스트 수정 비즈니스 로직 구현 (#131)
gardening-y Mar 2, 2024
80e90c3
feat: 여행 성향 테스트 수정 request dto 구현 (#131)
gardening-y Mar 2, 2024
a65e852
chore: 여행 성향 테스트 수정 로직 이동 (#131)
gardening-y Mar 2, 2024
136570f
Merge pull request #132 from Team-Going/feature/131
gardening-y Mar 3, 2024
80dad75
fix: 여행 TODO 상세 조회 API 스펙 변경 (#133)
SunwoongH Mar 3, 2024
e1348c9
feat: 여행 TODO Owner 위치 상수 추가 (#133)
SunwoongH Mar 3, 2024
29cb8f8
feat: 여행 TODO 상세 조회 dto 구현 (#133)
SunwoongH Mar 3, 2024
9257c58
feat: 여행 TODO 상세 조회 dto 변경 사항 반영 (#133)
SunwoongH Mar 3, 2024
64f9110
feat: 여행 TODO 상세 조회 비즈니스 로직 변경 및 추가 구현 (#133)
SunwoongH Mar 3, 2024
9929558
Merge pull request #135 from Team-Going/feature/133
SunwoongH Mar 3, 2024
e8b47af
feat: 여행 TODO 생성 관련 예외 메시지 추가 (#136)
SunwoongH Mar 3, 2024
1701f9d
fix: 여행 TODO 생성 API 스펙 변경 (#136)
SunwoongH Mar 3, 2024
436e0b1
feat: 여행 TODO 생성 MY TODO 배정자 검증 기능 추가 (#136)
SunwoongH Mar 3, 2024
a440c2f
Merge pull request #137 from Team-Going/feature/136
SunwoongH Mar 3, 2024
21a28b4
feat: 개별 프로필 조회 api 구현 (#134)
gardening-y Mar 3, 2024
3729a8c
feat: 개별 프로필 조회 비즈니스 로직 구현 (#134)
gardening-y Mar 3, 2024
4147ecf
feat: 개별 프로필 조회 response dto 구현 (#134)
gardening-y Mar 3, 2024
260c343
refactor: 개별 프로필 조회 builder, camel case 변경 (#134)
gardening-y Mar 3, 2024
0714e56
feat: 여행 TODO 엔티티 수정 기능 추가 (#140)
SunwoongH Mar 4, 2024
0a73dab
feat: 여행 TODO 배정자 조회 쿼리 구현 (#140)
SunwoongH Mar 4, 2024
1d6e61f
chore: 여행 TODO 생성 & 수정 dto 통합 후 변경 사항 반영 (#140)
SunwoongH Mar 4, 2024
ee9012e
feat: 여행 TODO 수정 비즈니스 로직 구현 (#140)
SunwoongH Mar 4, 2024
eb21f35
feat: 여행 TODO 수정 API 구현 (#140)
SunwoongH Mar 4, 2024
597ea79
Merge pull request #139 from Team-Going/feature/134
gardening-y Mar 4, 2024
f8f948a
Merge pull request #141 from Team-Going/feature/140
SunwoongH Mar 4, 2024
de55267
chore: 기존 class명 변경 (#142)
gardening-y Mar 6, 2024
8fa299c
feat: 여행 정보 조회 api 구현 (#142)
gardening-y Mar 6, 2024
ea9514f
feat: 여행 정보 조회 비즈니스 로직 구현 (#142)
gardening-y Mar 6, 2024
01713a9
feat: 여행 정보 조회 response dto 구현 (#142)
gardening-y Mar 6, 2024
17b15d0
Merge pull request #144 from Team-Going/feature/142
gardening-y Mar 6, 2024
8dd127b
refactor: 개별 프로필 조회 비즈니스 로직 리팩터링 (#143)
gardening-y Mar 6, 2024
123845b
fix: 여행 성향 검사 결과 dto 수정 (#146)
SunwoongH Mar 7, 2024
4658811
fix: 여행 친구 전체 조회 dto 수정 (#146)
SunwoongH Mar 7, 2024
4d4292e
feat: 여행 성향 검사 통계 결과 dto 구현 (#146)
SunwoongH Mar 7, 2024
8917cba
feat: 여행 성향 검사 통계 비즈니스 로직 담당 actor 클래스 구현 (#146)
SunwoongH Mar 7, 2024
37c4f20
feat: 여행 친구 전체 조회 비즈니스 로직 변경 (#146)
SunwoongH Mar 7, 2024
3e134f8
feat: 프로필 성향 테스트 skip case 대응 (#146)
SunwoongH Mar 7, 2024
e50a4bd
feat: 프로필 성향 테스트 skip case 대응 (#148)
SunwoongH Mar 7, 2024
71af0eb
Merge pull request #147 from Team-Going/feature/146
SunwoongH Mar 7, 2024
bca151c
Merge pull request #149 from Team-Going/feature/148
SunwoongH Mar 7, 2024
be1e9d1
refactor: null 결과값 상수화 및 early return 리팩터링 (#143)
gardening-y Mar 7, 2024
ae26b99
fix: revert 리팩터링 (#143)
gardening-y Mar 7, 2024
a80c6f7
Merge pull request #145 from Team-Going/feature/143
gardening-y Mar 7, 2024
1760271
feat: participant count 쿼리 추가 (#138)
SunwoongH Mar 9, 2024
d061f22
fix: my todo 조회 쿼리 오류 수정 (#138)
SunwoongH Mar 9, 2024
fd7a21b
fix: delete 쿼리 발생 x 오류 해결 (#138)
SunwoongH Mar 9, 2024
cec0dcc
feat: 여행 성향 검사 관련 상수 추가 (#151)
SunwoongH Mar 9, 2024
5b93517
fix: 여행 친구 성향 통계 결과 dto 수정 (#151)
SunwoongH Mar 9, 2024
f679a3a
fix: 여행 친구 성향 통계 계산 비즈니스 로직 수정 (#151)
SunwoongH Mar 9, 2024
3870ddb
fix: 여행 친구 성향 통계 dto 수정 (#151)
SunwoongH Mar 9, 2024
2ae613a
fix: 여행 친구 전체 조회 응답 dto 수정 (#151)
SunwoongH Mar 9, 2024
ae351aa
fix: 여행 친구 전체 조회 비즈니스 로직 수정 (#151)
SunwoongH Mar 9, 2024
39c2b7d
Merge pull request #150 from Team-Going/feature/138
SunwoongH Mar 9, 2024
77ed7cb
Merge pull request #152 from Team-Going/feature/151
SunwoongH Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions doorip-api/src/main/java/org/doorip/common/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ public abstract class Constants {
public static final String COMPLETE = "complete";
public static final String OUR = "our";
public static final String MY = "my";
public static final String STYLE_A = "style_a";
public static final String STYLE_B = "style_b";
public static final String STYLE_C = "style_c";
public static final String STYLE_D = "style_d";
public static final String STYLE_E = "style_e";
public static final int MIN_STYLE_RATE = 0;
public static final int MAX_STYLE_RATE = 100;
public static final int PROPENSITY_WEIGHT = 25;
public static final int MIN_PARTICIPANT_COUNT = 1;
public static final int MAX_PARTICIPANT_COUNT = 6;
public static final int TODO_OWNER_POSITION = 0;
public static final int START_STYLE_POS = 0;
public static final int END_STYLE_POS = 5;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package org.doorip.trip.actor;

import org.doorip.trip.domain.Participant;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.IntStream;

@Component
public class TripTendencyTestActor {
private static final String TRIP_PLAN = "여행 계획";
private static final String TRIP_PLACE = "여행 장소";
private static final String RESTAURANT = "식당";
private static final String PICTURE = "사진";
private static final String TRIP_SCHEDULE = "여행 일정";
private static final int INITIALIZATION = 0;
private static final int HIGH_RANGE_STYLE = 3;
private static final int HIGH_RANGE_STYLES = 5;
private static final int CENTER_POS = 2;
private final Map<Integer, String> prefer = Map.of(
0, TRIP_PLAN,
1, TRIP_PLACE,
2, RESTAURANT,
3, PICTURE,
4, TRIP_SCHEDULE
);

public TripTendencyTestResult calculateTripTendencyTest(List<Participant> participants) {
List<List<Integer>> rates = generateStyles();
List<List<Integer>> counts = generateStyles();
int participantCount = participants.size();
accumulateCounts(participants, counts);
List<String> bestPrefer = calculateBestPrefer(counts, participantCount);
calculateRatesAverage(rates, counts, participantCount);
return TripTendencyTestResult.of(bestPrefer, rates, counts);
}

private List<List<Integer>> generateStyles() {
List<List<Integer>> styles = new ArrayList<>();
IntStream.range(INITIALIZATION, HIGH_RANGE_STYLES)
.forEach(i -> styles.add(i, new ArrayList<>(Arrays.asList(INITIALIZATION, INITIALIZATION, INITIALIZATION))));
return styles;
}

private void accumulateCounts(List<Participant> participants, List<List<Integer>> counts) {
participants.forEach(participant -> {
accumulateCount(counts, participant.getStyleA(), 0);
accumulateCount(counts, participant.getStyleB(), 1);
accumulateCount(counts, participant.getStyleC(), 2);
accumulateCount(counts, participant.getStyleD(), 3);
accumulateCount(counts, participant.getStyleE(), 4);
});
}

private List<String> calculateBestPrefer(List<List<Integer>> counts, int participantCount) {
List<String> bestPrefer = new ArrayList<>();
IntStream.range(INITIALIZATION, HIGH_RANGE_STYLES)
.forEach(i -> {
List<Integer> count = counts.get(i);
if (count.contains(participantCount)) {
bestPrefer.add(prefer.get(i));
}
});
return bestPrefer;
}

private void calculateRatesAverage(List<List<Integer>> rates, List<List<Integer>> counts, int participantCount) {
double percentage = 100.0 / participantCount;
IntStream.range(INITIALIZATION, HIGH_RANGE_STYLES)
.forEach(i -> {
List<Integer> rate = rates.get(i);
List<Integer> count = counts.get(i);
IntStream.range(INITIALIZATION, HIGH_RANGE_STYLE)
.forEach(j -> rate.set(j, (int) Math.floor(count.get(j) * percentage)));
});
}

private void accumulateCount(List<List<Integer>> counts, int styleValue, int pos) {
List<Integer> count = counts.get(pos);
if (styleValue < CENTER_POS) {
count.set(0, count.get(0) + 1);
} else if (styleValue == CENTER_POS) {
count.set(1, count.get(1) + 1);
} else {
count.set(2, count.get(2) + 1);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.doorip.trip.actor;

import lombok.AccessLevel;
import lombok.Builder;

import java.util.List;

@Builder(access = AccessLevel.PRIVATE)
public record TripTendencyTestResult(
List<String> bestPrefer,
List<List<Integer>> rates,
List<List<Integer>> counts
) {
public static TripTendencyTestResult of(List<String> bestPrefer, List<List<Integer>> rates, List<List<Integer>> counts) {
return TripTendencyTestResult.builder()
.bestPrefer(bestPrefer)
.rates(rates)
.counts(counts)
.build();
}
}
19 changes: 15 additions & 4 deletions doorip-api/src/main/java/org/doorip/trip/api/TodoApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import org.doorip.auth.UserId;
import org.doorip.common.BaseResponse;
import org.doorip.trip.dto.request.TodoCreateRequest;
import org.doorip.trip.dto.request.TodoCreateAndUpdateRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
Expand All @@ -30,7 +30,11 @@ public interface TodoApi {
content = @Content),
@ApiResponse(
responseCode = "400",
description = "여행 TODO를 생성하기 위해 최소 1명 이상의 배정자가 필요합니다.",
description = "여행 MY TODO의 배정자가 누락되었습니다.",
content = @Content),
@ApiResponse(
responseCode = "400",
description = "여행 MY TODO의 배정자 번호가 잘못되었습니다.",
content = @Content),
@ApiResponse(
responseCode = "401",
Expand Down Expand Up @@ -60,8 +64,10 @@ public interface TodoApi {
responseCode = "500",
description = "서버 내부 오류입니다.",
content = @Content)})
ResponseEntity<BaseResponse<?>> createTripTodo(@PathVariable final Long tripId,
@RequestBody final TodoCreateRequest request);
ResponseEntity<BaseResponse<?>> createTripTodo(@Parameter(hidden = true)
@UserId final Long userId,
@PathVariable final Long tripId,
@RequestBody final TodoCreateAndUpdateRequest request);

@Operation(
summary = "여행 TODO 전체 조회 API",
Expand Down Expand Up @@ -128,6 +134,10 @@ ResponseEntity<BaseResponse<?>> getTripTodos(@Parameter(hidden = true)
responseCode = "401",
description = "액세스 토큰이 만료되었습니다. 재발급 받아주세요.",
content = @Content),
@ApiResponse(
responseCode = "404",
description = "존재하지 않는 여행입니다.",
content = @Content),
@ApiResponse(
responseCode = "404",
description = "존재하지 않는 여행 TODO입니다.",
Expand All @@ -142,6 +152,7 @@ ResponseEntity<BaseResponse<?>> getTripTodos(@Parameter(hidden = true)
content = @Content)})
ResponseEntity<BaseResponse<?>> getTripTodo(@Parameter(hidden = true)
@UserId final Long userId,
@PathVariable final Long tripId,
@PathVariable final Long todoId);

@Operation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.doorip.common.ApiResponseUtil;
import org.doorip.common.BaseResponse;
import org.doorip.message.SuccessMessage;
import org.doorip.trip.dto.request.TodoCreateRequest;
import org.doorip.trip.dto.request.TodoCreateAndUpdateRequest;
import org.doorip.trip.dto.response.TodoDetailGetResponse;
import org.doorip.trip.dto.response.TodoGetResponse;
import org.doorip.trip.service.TodoService;
Expand All @@ -23,9 +23,10 @@ public class TodoApiController implements TodoApi {

@PostMapping("/{tripId}/todos")
@Override
public ResponseEntity<BaseResponse<?>> createTripTodo(@PathVariable final Long tripId,
@RequestBody final TodoCreateRequest request) {
todoService.createTripTodo(tripId, request);
public ResponseEntity<BaseResponse<?>> createTripTodo(@UserId final Long userId,
@PathVariable final Long tripId,
@RequestBody final TodoCreateAndUpdateRequest request) {
todoService.createTripTodo(userId, tripId, request);
return ApiResponseUtil.success(SuccessMessage.CREATED);
}

Expand All @@ -39,14 +40,24 @@ public ResponseEntity<BaseResponse<?>> getTripTodos(@UserId final Long userId,
return ApiResponseUtil.success(SuccessMessage.OK, response);
}

@GetMapping("/todos/{todoId}")
@GetMapping("/{tripId}/todos/{todoId}")
@Override
public ResponseEntity<BaseResponse<?>> getTripTodo(@UserId final Long userId,
@PathVariable final Long tripId,
@PathVariable final Long todoId) {
final TodoDetailGetResponse response = todoService.getTripTodo(userId, todoId);
final TodoDetailGetResponse response = todoService.getTripTodo(userId, tripId, todoId);
return ApiResponseUtil.success(SuccessMessage.OK, response);
}

@PatchMapping("/{tripId}/todos/{todoId}")
public ResponseEntity<BaseResponse<?>> updateTripTodo(@UserId final Long userId,
@PathVariable final Long tripId,
@PathVariable final Long todoId,
@RequestBody final TodoCreateAndUpdateRequest request) {
todoService.updateTripTodo(userId, tripId, todoId, request);
return ApiResponseUtil.success(SuccessMessage.OK);
}

@DeleteMapping("/todos/{todoId}")
@Override
public ResponseEntity<BaseResponse<?>> deleteTripTodo(@PathVariable final Long todoId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import lombok.RequiredArgsConstructor;
import org.doorip.auth.UserId;
import org.doorip.common.BaseResponse;
import org.doorip.common.ApiResponseUtil;
import org.doorip.common.BaseResponse;
import org.doorip.message.SuccessMessage;
import org.doorip.trip.dto.request.TripCreateRequest;
import org.doorip.trip.dto.request.TripEntryRequest;
import org.doorip.trip.dto.request.TripUpdateRequest;
import org.doorip.trip.dto.request.TripVerifyRequest;
import org.doorip.trip.dto.request.ParticipantUpdateRequest;
import org.doorip.trip.dto.response.*;
import org.doorip.trip.service.TripDetailService;
import org.doorip.trip.service.TripService;
Expand All @@ -34,7 +36,7 @@ public ResponseEntity<BaseResponse<?>> createTrip(@UserId final Long userId,
@Override
public ResponseEntity<BaseResponse<?>> getTrips(@UserId final Long userId,
@RequestParam final String progress) {
final TripGetResponse response = tripService.getTrips(userId, progress);
final TripsGetResponse response = tripService.getTrips(userId, progress);
return ApiResponseUtil.success(SuccessMessage.OK, response);
}

Expand Down Expand Up @@ -77,4 +79,41 @@ public ResponseEntity<BaseResponse<?>> getParticipants(@UserId final Long userId
final TripParticipantGetResponse response = tripDetailService.getParticipants(userId, tripId);
return ApiResponseUtil.success(SuccessMessage.OK, response);
}

@PatchMapping("/{tripId}/leave")
public ResponseEntity<BaseResponse<?>> leaveTrip(@UserId final Long userId,
@PathVariable final Long tripId) {
tripDetailService.leaveTrip(userId, tripId);
return ApiResponseUtil.success(SuccessMessage.OK);
}

@GetMapping("/{tripId}")
public ResponseEntity<BaseResponse<?>> getTrip(@PathVariable final Long tripId,
@UserId final Long userId) {
final TripGetResponse response = tripService.getTrip(userId, tripId);
return ApiResponseUtil.success(SuccessMessage.OK, response);
}

@PatchMapping("/{tripId}")
public ResponseEntity<BaseResponse<?>> updateTrip(@PathVariable final Long tripId,
@UserId final Long userId,
@RequestBody final TripUpdateRequest request) {
tripService.updateTrip(userId, tripId, request);
return ApiResponseUtil.success(SuccessMessage.OK);
}

@PatchMapping("/{tripId}/participant")
public ResponseEntity<BaseResponse<?>> updateParticipant(@PathVariable final Long tripId,
@UserId final Long userId,
@RequestBody final ParticipantUpdateRequest request) {
tripDetailService.updateParticipant(userId, tripId, request);
return ApiResponseUtil.success(SuccessMessage.OK);
}

@GetMapping("/participants/{participantId}")
public ResponseEntity<BaseResponse<?>> getParticipantProfile(@PathVariable final Long participantId,
@UserId final Long userId) {
final TripParticipantProfileResponse response = tripDetailService.getParticipantProfile(userId, participantId);
return ApiResponseUtil.success(SuccessMessage.OK, response);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.doorip.trip.dto.request;

public record ParticipantUpdateRequest(
int styleA,
int styleB,
int styleC,
int styleD,
int styleE
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.time.LocalDate;
import java.util.List;

public record TodoCreateRequest(
public record TodoCreateAndUpdateRequest(
String title,
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
LocalDate endDate,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.doorip.trip.dto.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDate;

public record TripUpdateRequest(
String title,
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
LocalDate startDate,
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
LocalDate endDate
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.doorip.trip.dto.response;

import lombok.AccessLevel;
import lombok.Builder;
import org.doorip.trip.domain.Participant;

@Builder(access = AccessLevel.PRIVATE)
public record TodoDetailAllocatorResponse(
Long participantId,
String name,
boolean isOwner,
boolean isAllocated
) {
public static TodoDetailAllocatorResponse of(String name, boolean isOwner, boolean isAllocated, Participant participant) {
return TodoDetailAllocatorResponse.builder()
.participantId(participant.getId())
.name(name)
.isOwner(isOwner)
.isAllocated(isAllocated)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public record TodoDetailGetResponse(
String title,
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
LocalDate endDate,
List<TodoAllocatorResponse> allocators,
List<TodoDetailAllocatorResponse> allocators,
String memo,
boolean secret
) {
public static TodoDetailGetResponse of(Todo todo, List<TodoAllocatorResponse> allocators) {
public static TodoDetailGetResponse of(Todo todo, List<TodoDetailAllocatorResponse> allocators) {
return TodoDetailGetResponse.builder()
.title(todo.getTitle())
.endDate(todo.getEndDate())
Expand Down
Loading
Loading