-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] Matching 도메인 관련 스켈레톤 코드 구현 및 엔티티 설계 #3
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
Conversation
- BaseEntity를 상속받는 Matching 엔티티 구현 - MatchingRequestType, MatchingStatus Enum 정의
- Matching 도메인의 컨트롤러, 서비스, 레파지토리 클래스 생성 - Matching 도메인 전용 ErrorCode, Exception 정의
| public class MatchingReqDTO { | ||
|
|
||
| public record matchingReqDTO( | ||
| Long targetUserId, |
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.
targetUserId는 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.
네! targetUserId는 리더 -> 팀원 매칭 요청일 때만 받고, 팀원 -> 프로젝트 요청엔 projectId만 받아 서비스단에서 처리할 계획입니다.
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.NotNull; | ||
|
|
||
| public class MatchingReqDTO { |
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.
기존 코드의 DTO들이 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.
현재 Docs에는 'DTO'로 통일하기로 되어있는데, '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.
크게 중요한건 아닌데 통일만 하면 돼서 현재 프젝에 적용되어있는대로 Dto로 가면 좋을듯 해요
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| private Long id; | ||
|
|
||
| @Column(name = "request_user_id", 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.
컬럼 name을 명시 안 해줘도 requestUserId -> request_user_id로 jpa가 바꿔서 db에 저장해주는데 의도적으로 명시해준걸까요?
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.
넵! 의도대로 저장되지 않을 경우를 대비해서 명확하게 지정했습니다!
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| public class MatchingResDTO { |
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.
ResDTO 안에 여러 record를 넣을 계획이실까요?
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.
넵 매칭 관련 정보 조회 등 다른 API 개발하면서 필요한 여러 dto를 넣을 계획입니당
| public class Matching extends BaseEntity { | ||
|
|
||
| @Builder | ||
| public Matching( |
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.
외부에서 다루지 않을거라면 protected 혹은 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.
expiresAt이나 의도하지 않은 칼럼이 빌더에 의해 수정될 경우를 대비해서 따로 생성자를 정의했습니다. 이럴 경우 외부에서 빌더 패턴을 사용하려면 public으로 설정해야하는데, 혹시 더 좋은 패턴이나 선호하시는 방식이 있으시면 말씀해주세요!!
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.
좋습니다 굿굿
- DTO를 Dto로 네이밍 규칙에 따라 수정
ggamnunq
left a comment
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.
👍
Feat/Core-domain/Matching 도메인 관련 스켈레톤 코드 구현 및 엔티티 설계
🎯 작업 내용
주요 변경사항
상세 내용
✅ 체크리스트
💬 리뷰 요청사항