109 lines
2.8 KiB
Java
109 lines
2.8 KiB
Java
package monnethic.mobile.database;
|
|
|
|
import com.j256.ormlite.field.DatabaseField;
|
|
import com.j256.ormlite.table.DatabaseTable;
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* Created by Guillaume on 15/04/2018.
|
|
*/
|
|
|
|
//Class User which represent an User for api rest
|
|
public class User {
|
|
private int userId;
|
|
private String name;
|
|
private String firstname;
|
|
private String email;
|
|
private String password;
|
|
private long creation_date;
|
|
private long modification_date;
|
|
private boolean verified;
|
|
private boolean approved;
|
|
private String user_hash;
|
|
|
|
//Constructors
|
|
public User(String name, String firstname, String email, String password) {
|
|
this.name = name;
|
|
this.firstname = firstname;
|
|
this.email = email;
|
|
this.password = password;
|
|
}
|
|
|
|
public User(int userId, String name, String firstname, String user_hash, String email, String password, long creation_date, long modification_date, boolean verified, boolean approved) {
|
|
this.userId=userId;
|
|
this.name = name;
|
|
this.firstname = firstname;
|
|
this.user_hash = user_hash;
|
|
this.email = email;
|
|
this.password = password;
|
|
this.creation_date = creation_date;
|
|
this.modification_date = modification_date;
|
|
this.verified = verified;
|
|
this.approved = approved;
|
|
}
|
|
|
|
|
|
//Getters and Setters
|
|
public int getUserId(){return userId;}
|
|
public void setUserId(int userId){this.userId=userId;}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getFirstname() {
|
|
return firstname;
|
|
}
|
|
public void setFirstname(String firstname) {
|
|
this.firstname = firstname;
|
|
}
|
|
|
|
public String getUser_hash(){return user_hash;}
|
|
public void setUser_hash(String user_hash){this.user_hash=user_hash;}
|
|
|
|
public String getEmail() {
|
|
return email;
|
|
}
|
|
public void setEmail(String email) {
|
|
this.email = email;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
public void setPassword(String password) {
|
|
this.password = password;
|
|
}
|
|
|
|
public long getCreation_date() {
|
|
return creation_date;
|
|
}
|
|
public void setCreation_date(long creation_date) {
|
|
this.creation_date = creation_date;
|
|
}
|
|
|
|
public long getModification_date() {
|
|
return modification_date;
|
|
}
|
|
public void setModification_date(long modification_date) {
|
|
this.modification_date = modification_date;
|
|
}
|
|
|
|
public boolean isVerified() {
|
|
return verified;
|
|
}
|
|
public void setVerified(boolean verified) {
|
|
this.verified = verified;
|
|
}
|
|
|
|
public boolean isApproved() {
|
|
return approved;
|
|
}
|
|
public void setApproved(boolean approved) {
|
|
this.approved = approved;
|
|
}
|
|
}
|