-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: 화면 안의 요청들 거리순 정렬 후 반환 #30
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,10 @@ public class DdipEventEntity { | |
| @Column(nullable = false) | ||
| private Double longitude; | ||
|
|
||
| @Column(nullable = false) | ||
| @Setter | ||
| private String cellId; | ||
|
|
||
|
Comment on lines
+47
to
+50
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 생각해보니 notion에는 ddipEvent 엔티티 필드에 cellId가 정의되어 있지 않았네요 |
||
| @Column(nullable = false) | ||
| private Instant createdAt; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package com.knu.ddip.location.application.util; | ||
|
|
||
| public abstract class S2Constants { | ||
| public static int LEVEL = 17; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package com.knu.ddip.ddipevent.fixture; | ||
|
|
||
| import com.knu.ddip.ddipevent.domain.DdipStatus; | ||
| import com.knu.ddip.ddipevent.infrastructure.entity.DdipEventEntity; | ||
|
|
||
| import java.time.Instant; | ||
| import java.util.UUID; | ||
|
|
||
| public abstract class DdipEventFixture { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixture 만들어두는거 좋네요 👍 |
||
|
|
||
| public static DdipEventEntity createDdipEvent() { | ||
| DdipEventEntity event = createDdipEvent(0.0, 0.0, DdipStatus.OPEN, "content", "cellId"); | ||
| return event; | ||
| } | ||
|
|
||
| public static DdipEventEntity createDdipEvent(Double lat, Double lon, DdipStatus status, String content, String cellId) { | ||
| DdipEventEntity event = DdipEventEntity.builder() | ||
| .content(content) | ||
| .createdAt(Instant.now()) | ||
| .difficulty(1) | ||
| .latitude(lat) | ||
| .longitude(lon) | ||
| .requesterId(UUID.randomUUID()) | ||
| .reward(1) | ||
| .status(status) | ||
| .title("title") | ||
| .cellId(cellId) | ||
| .build(); | ||
| return event; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
컨트롤러단에서 ddipEvent를 생성했을 때 리턴값으로 ddipEvent 도메인을 기반으로 한 dto Json으로 변환해서 제공하기 때문에 cellId에 대한 Mapper에서
toDomain부분에도 cellId 관련 로직과 DdipEvent 도메인 자체에도 cellId 필드가 있어야 할 것 같습니다.추후 cellId를 활용한 타 비즈니스 로직이 필요할 때도 현재 domain과 entity가 나뉘어져 있기 때문에 domain단에도 필드가 정의되어 있어야 DDD를 활용가능 할 것 같네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 넵! 수정하겠습니다.