package com.mandi.system.persist;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
import javax.persistence.Entity;
|
import javax.persistence.EnumType;
|
import javax.persistence.Enumerated;
|
import javax.persistence.Id;
|
import javax.persistence.Table;
|
import javax.persistence.Temporal;
|
import javax.persistence.TemporalType;
|
import javax.persistence.UniqueConstraint;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
/**
|
* 用户帐户
|
* @author guolq
|
*
|
*/
|
@Entity
|
@Table(name="fd_user",uniqueConstraints={@UniqueConstraint(columnNames="username")})//,indexes={@Index(columnList="username")}
|
public class User implements Serializable{
|
private static final long serialVersionUID = 1L;
|
@Id
|
private String id;
|
private String username;//用户名
|
private String password;//密码
|
private String companyNo;//运输公司
|
private String phone;//联系方式
|
private String name;//用户名
|
private String sex;
|
private boolean state;//是否启用
|
@Temporal(TemporalType.TIMESTAMP)
|
private Date lastlogin;
|
@Enumerated(EnumType.STRING)
|
private UserType utype;//用户类型
|
|
|
public String getUsername() {
|
return username;
|
}
|
public void setUsername(String username) {
|
this.username = StringUtils.trim(username);
|
}
|
public String getId() {
|
return id;
|
}
|
public void setId(String id) {
|
this.id = id;
|
}
|
public String getPassword() {
|
return password;
|
}
|
public void setPassword(String password) {
|
this.password = password;
|
}
|
public String getCompanyNo() {
|
return companyNo;
|
}
|
public void setCompanyNo(String companyNo) {
|
this.companyNo = companyNo;
|
}
|
public String getPhone() {
|
return phone;
|
}
|
public void setPhone(String phone) {
|
this.phone = phone;
|
}
|
public String getName() {
|
return name;
|
}
|
public void setName(String name) {
|
this.name = name;
|
}
|
public String getSex() {
|
return sex;
|
}
|
public void setSex(String sex) {
|
this.sex = sex;
|
}
|
public boolean isState() {
|
return state;
|
}
|
public void setState(boolean state) {
|
this.state = state;
|
}
|
public Date getLastlogin() {
|
return lastlogin;
|
}
|
public void setLastlogin(Date lastlogin) {
|
this.lastlogin = lastlogin;
|
}
|
public UserType getUtype() {
|
return utype;
|
}
|
public void setUtype(UserType utype) {
|
this.utype = utype;
|
}
|
|
|
}
|