62 lines
1.5 KiB
Java
62 lines
1.5 KiB
Java
package com.cubetiqs.fusion.data.entity;
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
import com.cubetiqs.fusion.data.AbstractEntity;
|
|
import com.vaadin.fusion.Nonnull;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import java.util.Set;
|
|
import javax.persistence.ElementCollection;
|
|
import javax.persistence.FetchType;
|
|
import com.cubetiqs.fusion.data.Role;
|
|
import javax.persistence.Lob;
|
|
|
|
@Entity
|
|
public class User extends AbstractEntity {
|
|
|
|
@Nonnull
|
|
private String username;
|
|
@Nonnull
|
|
private String name;
|
|
@JsonIgnore
|
|
private String hashedPassword;
|
|
@ElementCollection(fetch = FetchType.EAGER)
|
|
@Nonnull
|
|
private Set<Role> roles;
|
|
@Nonnull
|
|
@Lob
|
|
private String profilePictureUrl;
|
|
|
|
public String getUsername() {
|
|
return username;
|
|
}
|
|
public void setUsername(String username) {
|
|
this.username = username;
|
|
}
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
public String getHashedPassword() {
|
|
return hashedPassword;
|
|
}
|
|
public void setHashedPassword(String hashedPassword) {
|
|
this.hashedPassword = hashedPassword;
|
|
}
|
|
public Set<Role> getRoles() {
|
|
return roles;
|
|
}
|
|
public void setRoles(Set<Role> roles) {
|
|
this.roles = roles;
|
|
}
|
|
public String getProfilePictureUrl() {
|
|
return profilePictureUrl;
|
|
}
|
|
public void setProfilePictureUrl(String profilePictureUrl) {
|
|
this.profilePictureUrl = profilePictureUrl;
|
|
}
|
|
|
|
}
|