app-mobile/app/src/main/java/monnethic/mobile/database/User.java
2019-04-17 22:08:19 +02:00

163 lines
4.6 KiB
Java

package monnethic.mobile.database;
//Class User which represent an User for api rest
public class User {
private int user_id;
private String name;
private String firstname;
private String email;
private String password;
private long creation_date;
private long modification_date;
private String phone;
private String association;
private boolean verified;
private boolean approved;
private String user_hash;
//Constructors
public User() {
}
public User(String email, String password){
this.email = email;
this.password = password;
}
public User(String name, String firstname, String email, String password, String association) {
this.name = name;
this.firstname = firstname;
this.email = email;
this.password = password;
this.association = association;
}
public User(String name, String firstname, String email, String password, String phone, String association){
this.name = name;
this.firstname = firstname;
this.email = email;
this.password = password;
this.phone = phone;
this.association = association;
}
public User(String name, String firstname,String user_hash, String email, String password, long creation_date, long modification_date, boolean verified, boolean approved) {
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;
}
public User(String name, String firstname,String user_hash, String email, String password, long creation_date, long modification_date, String phone, String association, boolean verified, boolean approved) {
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.phone = phone;
this.association = association;
this.verified = verified;
this.approved = approved;
}
//Getters and Setters
public int getUserId() {
return user_id;
}
public void setUserId(int userId) {this.user_id = userId;}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUser_hash(){return user_hash;}
public void setUser_hash(String user_hash){this.user_hash = user_hash;}
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 String getPhone(){return phone;}
public void setPhone(String phone){this.phone=phone;}
public String getAssociation(){return association;}
public void setAssociation(){this.association=association;}
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;
}
@Override
public String toString() {
return "User{" +
"userId=" + user_id +
", name='" + name + '\'' +
", firstname='" + firstname + '\'' +
", email='" + email + '\'' +
", password='" + password + '\'' +
", creation_date=" + creation_date +
", modification_date=" + modification_date +
", phone= "+phone+
", association= "+association+
", verified=" + verified +
", approved=" + approved +
", user_hash='" + user_hash + '\'' +
'}';
}
}