-
Notifications
You must be signed in to change notification settings - Fork 1
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
[feat] : 경매글 등록 API 구현 #23
Conversation
경매글 등록 작업이 많네요 고생하셨습니다 ! |
추가 작업 내용오류 해결api 모듈에서 testContainerSupport 및 fixture 사용 불가 문제 해결
테스트 추가
통합 테스트 돌리니 403 에러 떠서 build.gradle에 security 관련 의존성 주석 처리했습니다. |
core/src/main/java/dev/handsup/auction/domain/auction_field/PurchaseTime.java
Outdated
Show resolved
Hide resolved
@@ -12,6 +13,6 @@ dependencies { | |||
} | |||
|
|||
tasks.named('jar') { | |||
enabled = false | |||
enabled = true |
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.
enabled = false 로 되어있으면 jar 파일이 안 생겼나요? 바꾸신 이유가 궁금합니다
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.
bootJar enabled하면 jar가 생기고, jar enabled하면 plain.jar가 생깁니다. 멀티 모듈일 때는 plain.jar 필요해서 true로 설정했습니다.
api/src/test/java/dev/handsup/auction/controller/AuctionControllerTest.java
Show resolved
Hide resolved
api/src/test/java/dev/handsup/auction/controller/AuctionControllerTest.java
Show resolved
Hide resolved
.andExpect(jsonPath("$.si").isEmpty()) | ||
.andExpect(jsonPath("$.gu").isEmpty()) | ||
.andExpect(jsonPath("$.dong").isEmpty()); | ||
} |
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.
경매글 등록에 실패하면 예외를 던지는 테스트는 필요없을까요?
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.
추가하겠습니다~
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "auction_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "seller_id", | ||
nullable = false, | ||
// nullable = false, |
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.
판매자가 null 이 될 수가 있나요??
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.
아직 유저 쪽 구현이 안되어서 일단 null 허용하였습니다.
@@ -81,9 +90,10 @@ public class Auction extends TimeBaseEntity { | |||
private int bookmarkCount; | |||
|
|||
@Builder | |||
public Auction(User seller, String title, Product product, int initPrice, LocalDate endDate, |
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.
판매자가 null 이 될 수가 있나요?? 라는 질문과 동일한 부분입니다
this.categoryValue = categoryValue; | ||
} | ||
|
||
public static ProductCategory of(String categoryValue) { |
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.
다른 엔티티와 다르게 ProductCategory 에는 빌더를 private 로 막고
팩토리메서드를 쓰신 이유가 있을까요~?
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.
Auction, Product에도 팩토리 메서드 추가하겠습니다!
import lombok.Builder; | ||
|
||
@Builder | ||
public record RegisterAuctionRequest( |
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.
RegisterAuctionApiRequest
와 요청하는 필드가 똑같은데,
dto 를 분리한 이점이 있는걸까요~?
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.
service가 controller에 의존하지 않게 하고자 dto를 분리하였습니다~ 예전에 슬랙에 보내드린 링크 참고해주시면 될 것 같아요
close #22
📑 작업 상세 내용
💫 작업 요약
🔍 중점적으로 리뷰 할 부분