-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMember.java
More file actions
37 lines (29 loc) · 855 Bytes
/
Member.java
File metadata and controls
37 lines (29 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package knu_chatbot.infrastructure.entity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
@Getter
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Table(name = "member")
public class Member extends BaseEntity {
@Column(nullable = false, unique = true)
private String email;
@Column(nullable = false)
private String password;
@Builder
public Member(String email, String password) {
this.email = email;
this.password = password;
}
private void setPassword(String password) {
this.password = password;
}
public void changePassword(String newEncryptedPassword) {
setPassword(newEncryptedPassword);
}
}