-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.umc.dream.domain; | ||
|
||
import com.umc.dream.domain.enums.Role; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class User { | ||
|
||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(nullable = false, length = 10) | ||
private String name; | ||
|
||
@Column(nullable = false, length = 20) | ||
private String account; | ||
|
||
@Column(nullable = false, length = 20) | ||
private String password; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private Role role; | ||
|
||
@Builder | ||
public User(String name, String account, String password, Role role) { | ||
this.name = name; | ||
this.account = account; | ||
this.password = password; | ||
this.role = role; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.umc.dream.domain.enums; | ||
|
||
public enum Role { | ||
NORMAL, PRO | ||
} |