FEAT: Auth useing encrypted credentials in DB
This commit is contained in:
49
src/main/java/com/mallardromain/hotel/model/User.java
Normal file
49
src/main/java/com/mallardromain/hotel/model/User.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package com.mallardromain.hotel.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name = "users")
|
||||
public class User {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
public User(){
|
||||
|
||||
}
|
||||
|
||||
public User(String username, String password ){
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public Integer getId(){
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user