-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π νμ κ°μ
IN port Command(#3)
- Loading branch information
Showing
1 changed file
with
16 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 16 additions & 1 deletion
17
api/src/main/java/hexagonal/api/member/application/port/in/RegisterMemberCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
package hexagonal.api.member.application.port.in; | ||
|
||
import hexagonal.core.domain.jpa.MemberJpaEntity; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class RegisterMemberCommand { | ||
|
||
private final String name; | ||
private final String email; | ||
private final String memberType; | ||
|
||
public RegisterMemberCommand(String name, String type) { | ||
public RegisterMemberCommand(String name, String email, String type) { | ||
this.name = name; | ||
this.email = email; | ||
this.memberType = type; | ||
// MemberType ENUM String μΌμΉ μ λ ₯ μ ν¨μ± κ²μ¦ | ||
// name Validation μΆκ° | ||
} | ||
|
||
public MemberJpaEntity toJpaEntity() { | ||
return MemberJpaEntity.builder() | ||
.id(null) | ||
.name(name) | ||
.email(email) | ||
.type(memberType) | ||
.build(); | ||
} | ||
|
||
} |