Skip to content

Conversation

@lalabulla
Copy link
Collaborator

코드리뷰시 참고할 사항입니다.

  • 테이블 구조 고민이 좀 많았는데, 최종적으로 아래와 같이 구성햇습니다. 아래와 같이 구성한 이유는 필터링과 랜덤태그를 고려했을 때 모든 항목이 컬럼으로 존재하는게 낫다고 판단했습니다
    • 기존 Member 테이블에 공통(목적, 예산, 월수입, 우선순위, 관심동네) 항목을 추가
    • 나머지 항목은 갭투자, 실거주를 나누어서 각각 테이블 생성

@lalabulla lalabulla self-assigned this Jul 29, 2025
Copy link
Member

@yeonkyungJoo yeonkyungJoo left a comment

Choose a reason for hiding this comment

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

ENUM들이 많은데,
프론트 쪽에 전달하다가 오류가 날 수 있으니 ENUM 클래스별로 API를 제공하는 게 좋을 것 같아요.

@@ -1,0 +1,3 @@
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
Copy link
Member

Choose a reason for hiding this comment

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

domain-core에는 web과 같은 외부 의존성이 들어가지 않아야 합니다.

public static final String LIST_MEMBER = MEMBER;

public static final String JOIN_MEMBER = MEMBER + "/join";
public static final String CONDITION_MEMBER = MEMBER + "/onboarding";
Copy link
Member

Choose a reason for hiding this comment

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

URL이 너무 '온보딩'에 국한되어 있는 것 같습니다. 조건을 설정하다는 의미의 URL이 좋을 것 같아요. set-options나 set-conditions/preference 같은 게 더 좋을 것 같습니다.

//관심동네
InterestDistrictCommand interestDistrictCommand = new InterestDistrictCommand(onboardingRequest.interestDistrict());

Boolean joinResult = memberApplicationService.condition(conditionCommand, priorityCommand, interestDistrictCommand);
Copy link
Member

Choose a reason for hiding this comment

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

joinResult보다 다른 변수명이 좋을 것 같습니다. 가급적이면 메소드명과 일치하는 변수명으로 해주세요!


@Transactional
public Boolean condition(ConditionCommand conditionCommand, PriorityCommand priorityCommand, InterestDistrictCommand interestDistrictCommand) {
// 1. 토큰에서 유저 정보 추출 후 검증
Copy link
Member

Choose a reason for hiding this comment

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

컨트롤러에서 @AuthenticationPrincipal UUID memberId 파라미터로 설정해두면 됩니다. 이미 필터에서 토큰 추출해서 검증하고 들어올 거에요.


Member setCommonCondition(Member member,Purpose purpose, Budget budget, MonthIncome monthIncome);

ActualLiving setActualLivingCondition(MemberId memberId, LivingPerson livingPerson, ChildrenPlan childrenPlan, SchoolDistrict schoolDistrict, Traffic traffic, CommutingArea commutingArea, InfraNew infra, Environment environment);
Copy link
Member

Choose a reason for hiding this comment

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

매개변수를 다 나열하는 것보다 하나의 DTO를 만드는 게 더 깔끔하지 않을까요?

import lombok.Getter;

@Getter
public class GapInvestment extends AggregateRoot<GapInvestmentId> {
Copy link
Member

Choose a reason for hiding this comment

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

AggregateRoot가 맞는지 한번 생각해봐야할 것 같아요.

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