diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/member/dto/SignUpDto.java b/backend/core/src/main/java/com/rollthedice/backend/domain/member/dto/SignUpDto.java new file mode 100644 index 00000000..f9da9bfb --- /dev/null +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/member/dto/SignUpDto.java @@ -0,0 +1,10 @@ +package com.rollthedice.backend.domain.member.dto; + +import lombok.Getter; +import lombok.NoArgsConstructor; + +@NoArgsConstructor +@Getter +public class SignUpDto { + private String nickname; +} diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/member/entity/Member.java b/backend/core/src/main/java/com/rollthedice/backend/domain/member/entity/Member.java index 1a7a83a4..f25a7332 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/member/entity/Member.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/member/entity/Member.java @@ -40,4 +40,8 @@ public Member update(String email, String imageUrl) { public void updateRefreshToken(String updateRefreshToken) { this.refreshToken = updateRefreshToken; } + + public void updateNickname(String nickname) { + this.nickname = nickname; + } } diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/member/service/MemberService.java b/backend/core/src/main/java/com/rollthedice/backend/domain/member/service/MemberService.java new file mode 100644 index 00000000..f41faeb4 --- /dev/null +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/member/service/MemberService.java @@ -0,0 +1,18 @@ +package com.rollthedice.backend.domain.member.service; + +import com.rollthedice.backend.domain.member.dto.SignUpDto; +import com.rollthedice.backend.domain.member.entity.Member; +import com.rollthedice.backend.domain.member.query.AuthService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +@RequiredArgsConstructor +@Service +public class MemberService { + private final AuthService authService; + + public void signUp(SignUpDto dto) { + Member member = authService.getMember(); + member.updateNickname(dto.getNickname()); + } +}