Skip to content

Commit

Permalink
[#2] Member Entity 수정 (oauth_id, password 컬럼 추가)
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Oct 8, 2021
1 parent b389511 commit 51bb9af
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@Getter
@Table(name = "member")
@ToString(of = {"name", "email"})
@ToString(of = {"memIdx", "name", "email", "provider"})
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity
public class Member extends BaseTimeEntity {
Expand All @@ -17,14 +17,20 @@ public class Member extends BaseTimeEntity {
@Column(name = "mem_idx")
private Long memIdx;

@Column(name = "oauth_id")
private Integer oauthId;

@Column(name = "password")
private String password;

@Column(name = "mem_name", nullable = false)
private String name;

@Setter
@Column(name = "mem_nickname", unique = true)
private String nickName;

@Column(name = "mem_email", unique = true, nullable = false)
@Column(name = "mem_email", unique = true)
private String email;

@Column(name = "mem_image_url", nullable = false)
Expand All @@ -39,7 +45,9 @@ public class Member extends BaseTimeEntity {
private Provider provider; // OAuth2 Provider

@Builder
public Member(String name, String nickName, String email, String picture, Role role, Provider provider) {
public Member(Integer oauthId, String password, String name, String nickName, String email, String picture, Role role, Provider provider) {
this.oauthId = oauthId;
this.password = password;
this.name = name;
this.nickName = nickName;
this.email = email;
Expand Down

0 comments on commit 51bb9af

Please sign in to comment.