diff options
Diffstat (limited to 'src/main/java/com/mavlushechka/studentdatabase/domain/User.java')
-rwxr-xr-x | src/main/java/com/mavlushechka/studentdatabase/domain/User.java | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/main/java/com/mavlushechka/studentdatabase/domain/User.java b/src/main/java/com/mavlushechka/studentdatabase/domain/User.java new file mode 100755 index 0000000..39c3ac9 --- /dev/null +++ b/src/main/java/com/mavlushechka/studentdatabase/domain/User.java @@ -0,0 +1,66 @@ +package com.mavlushechka.studentdatabase.domain; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Set; + +@Document(collection = "users") +public class User { + @Id + private String id; + private String username; + private String password; + private boolean active; + private Set<Role> roles; + + public User() { + } + + public User(String username, String password, boolean active, Set<Role> roles) { + this.username = username; + this.password = password; + this.active = active; + this.roles = roles; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + public Set<Role> getRoles() { + return roles; + } + + public void setRoles(Set<Role> roles) { + this.roles = roles; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } +} |