Skip to content
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

[FIX] Entity 보호 #347

Open
1 task
thguss opened this issue Oct 16, 2024 · 0 comments
Open
1 task

[FIX] Entity 보호 #347

thguss opened this issue Oct 16, 2024 · 0 comments
Assignees

Comments

@thguss
Copy link
Member

thguss commented Oct 16, 2024

📌 상세 설명

  • 도메인 VO으로만 Entity에 접근할 수 있게 합니다.
  • as is : Entity 내 비즈니스 관련 생성자 존재
  • to be : 비즈니스 관련 생성자 도메인 VO로 이동
	// move to Member
	public MemberEntity(SocialType socialType, String socialId) {
		this.socialType = socialType;
		this.socialId = socialId;
		this.basicCottonCount = 0;
		this.rainbowCottonCount = 0;
	}

	public MemberEntity(Member member) {
		this.socialType = member.getSocialInfo().getSocialType();
		this.socialId = member.getSocialInfo().getSocialId();
		this.basicCottonCount = member.getCottonInfo().getBasicCottonCount();
		this.rainbowCottonCount = member.getCottonInfo().getRainbowCottonCount();
	}

📝 체크리스트

  • 관련된 모든 Entity
@thguss thguss self-assigned this Oct 16, 2024
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

No branches or pull requests

1 participant