Skip to content

Conversation

@zeoueon
Copy link
Collaborator

@zeoueon zeoueon commented Jan 15, 2026

Feat/Core-domain/Matching 도메인 관련 스켈레톤 코드 구현 및 엔티티 설계

🎯 작업 내용

  • Matching Entity를 설계했습니다.
  • Matching 도메인 관련 Controller, Service, Repository 클래스를 생성했습니다.
  • Matching 도메인 전용 ErrorCode 및 Exception을 구현했습니다.
  • 매칭 요청/응답의 DTO를 정의했습니다.

주요 변경사항

  • 멀티 모듈 구조에 맞게 패키지 및 파일을 추가했습니다.

상세 내용

  • 'nect-core' -> 도메인 레파지토리, 엔티티, 공통 Enum 배치
  • 'nect-api' -> Controller, Service, DTO 및 도메인 전용 에러 핸들러 구현

✅ 체크리스트

  • 코드 빌드가 정상적으로 완료되었나요?
  • 테스트(API 명세)를 추가/수정했나요?
  • 코드 리뷰 요청 전 self-review를 진행했나요?

💬 리뷰 요청사항

  • 멀티 모듈 구조에 맞지 않는 파일이나 패키지가 있으면 말씀해주세요!!

- BaseEntity를 상속받는 Matching 엔티티 구현
- MatchingRequestType, MatchingStatus Enum 정의
- Matching 도메인의 컨트롤러, 서비스, 레파지토리 클래스 생성
- Matching 도메인 전용 ErrorCode, Exception 정의
public class MatchingReqDTO {

public record matchingReqDTO(
Long targetUserId,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

targetUserId는 null이어도 되나요?

Copy link
Collaborator Author

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기존 코드의 DTO들이 Dto처럼 소문자로 되어 있어서 이 부분 통일하면 좋을듯 합니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 Docs에는 'DTO'로 통일하기로 되어있는데, 'Dto'로 수정해서 작업하는 것이 좋을까요?

Copy link
Collaborator

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)
Copy link
Collaborator

@ggamnunq ggamnunq Jan 16, 2026

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에 저장해주는데 의도적으로 명시해준걸까요?

Copy link
Collaborator Author

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResDTO 안에 여러 record를 넣을 계획이실까요?

Copy link
Collaborator Author

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(
Copy link
Collaborator

@ggamnunq ggamnunq Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

외부에서 다루지 않을거라면 protected 혹은 private도 고려해보면 좋을 듯 합니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expiresAt이나 의도하지 않은 칼럼이 빌더에 의해 수정될 경우를 대비해서 따로 생성자를 정의했습니다. 이럴 경우 외부에서 빌더 패턴을 사용하려면 public으로 설정해야하는데, 혹시 더 좋은 패턴이나 선호하시는 방식이 있으시면 말씀해주세요!!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋습니다 굿굿

- DTO를 Dto로 네이밍 규칙에 따라 수정
Copy link
Collaborator

@ggamnunq ggamnunq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@zeoueon zeoueon merged commit 32afd0b into develop Jan 22, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants