diff --git a/src/main/java/com/kumofactory/cloud/member/domain/Member.java b/src/main/java/com/kumofactory/cloud/member/domain/Member.java index f4bed73..ab53028 100644 --- a/src/main/java/com/kumofactory/cloud/member/domain/Member.java +++ b/src/main/java/com/kumofactory/cloud/member/domain/Member.java @@ -9,6 +9,7 @@ import javax.persistence.Id; import javax.persistence.OneToMany; +import com.kumofactory.cloud.oauth.dto.UserInfoDto; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; @@ -23,8 +24,18 @@ public class Member { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - private Long social_id; + private String oauth_id; + + private String provider; @OneToMany(mappedBy = "member") private List bluePrints; + + // =========== 생성함수 =========== // + public static Member createMember(UserInfoDto userInfoDto) { + Member member = new Member(); + member.setOauth_id(userInfoDto.id()); + member.setProvider(userInfoDto.provider()); + return member; + } }