121 lines
2.8 KiB
Java
121 lines
2.8 KiB
Java
package monnethic.mobile.user;
|
|
|
|
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 in the postgresDB
|
|
@DatabaseTable(tableName = "T_USER")
|
|
public class User {
|
|
@DatabaseField(canBeNull = false)
|
|
private String name;
|
|
@DatabaseField(canBeNull = false)
|
|
private String firstname;
|
|
@DatabaseField(id = true)
|
|
private String email;
|
|
@DatabaseField(canBeNull = false)
|
|
private String password;
|
|
@DatabaseField(canBeNull = false)
|
|
private long creation_date;
|
|
@DatabaseField(canBeNull = false)
|
|
private long modification_date;
|
|
@DatabaseField(canBeNull = false)
|
|
private boolean verified;
|
|
@DatabaseField(canBeNull = false)
|
|
private boolean approved;
|
|
|
|
//Constructors
|
|
//Default constructor for ORMLite
|
|
public User() {
|
|
}
|
|
|
|
public User(String name, String firstname, String email, String password) {
|
|
this.name = name;
|
|
this.firstname = firstname;
|
|
this.email = email;
|
|
this.password = password;
|
|
}
|
|
|
|
public User(String name, String firstname, String email, String password, long creation_date, long modification_date, boolean verified, boolean approved) {
|
|
this.name = name;
|
|
this.firstname = firstname;
|
|
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 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 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;
|
|
}
|
|
}
|