62 lines
1.2 KiB
Java
62 lines
1.2 KiB
Java
package eu.eudat.entities.security;
|
|
|
|
import java.util.UUID;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
|
|
|
@Entity
|
|
@Table(name="\"UserAuth\"")
|
|
@JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="id")
|
|
public class UserAuth {
|
|
|
|
@Id
|
|
@GeneratedValue
|
|
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
|
@Column(name = "id", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
|
private UUID id;
|
|
|
|
@Column(name = "username", nullable = false)
|
|
private String username;
|
|
|
|
@Column(name = "password", nullable = false)
|
|
private String password; //hash-encoded password
|
|
|
|
|
|
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
|
|
|
|
}
|