提交 | 用户 | 时间
|
58d006
|
1 |
package com.mandi.system.persist; |
A |
2 |
|
|
3 |
import java.io.Serializable; |
|
4 |
import java.util.Date; |
|
5 |
|
|
6 |
import javax.persistence.Entity; |
|
7 |
import javax.persistence.EnumType; |
|
8 |
import javax.persistence.Enumerated; |
|
9 |
import javax.persistence.Id; |
|
10 |
import javax.persistence.Table; |
|
11 |
import javax.persistence.Temporal; |
|
12 |
import javax.persistence.TemporalType; |
|
13 |
import javax.persistence.UniqueConstraint; |
|
14 |
|
|
15 |
import org.apache.commons.lang3.StringUtils; |
|
16 |
|
|
17 |
/** |
|
18 |
* 用户帐户 |
|
19 |
* @author guolq |
|
20 |
* |
|
21 |
*/ |
|
22 |
@Entity |
|
23 |
@Table(name="fd_user",uniqueConstraints={@UniqueConstraint(columnNames="username")})//,indexes={@Index(columnList="username")} |
|
24 |
public class User implements Serializable{ |
|
25 |
private static final long serialVersionUID = 1L; |
|
26 |
@Id |
|
27 |
private String id; |
|
28 |
private String username;//用户名 |
|
29 |
private String password;//密码 |
|
30 |
private String companyNo;//运输公司 |
|
31 |
private String phone;//联系方式 |
|
32 |
private String name;//用户名 |
|
33 |
private String sex; |
|
34 |
private boolean state;//是否启用 |
|
35 |
@Temporal(TemporalType.TIMESTAMP) |
|
36 |
private Date lastlogin; |
|
37 |
@Enumerated(EnumType.STRING) |
|
38 |
private UserType utype;//用户类型 |
|
39 |
|
|
40 |
|
|
41 |
public String getUsername() { |
|
42 |
return username; |
|
43 |
} |
|
44 |
public void setUsername(String username) { |
|
45 |
this.username = StringUtils.trim(username); |
|
46 |
} |
|
47 |
public String getId() { |
|
48 |
return id; |
|
49 |
} |
|
50 |
public void setId(String id) { |
|
51 |
this.id = id; |
|
52 |
} |
|
53 |
public String getPassword() { |
|
54 |
return password; |
|
55 |
} |
|
56 |
public void setPassword(String password) { |
|
57 |
this.password = password; |
|
58 |
} |
|
59 |
public String getCompanyNo() { |
|
60 |
return companyNo; |
|
61 |
} |
|
62 |
public void setCompanyNo(String companyNo) { |
|
63 |
this.companyNo = companyNo; |
|
64 |
} |
|
65 |
public String getPhone() { |
|
66 |
return phone; |
|
67 |
} |
|
68 |
public void setPhone(String phone) { |
|
69 |
this.phone = phone; |
|
70 |
} |
|
71 |
public String getName() { |
|
72 |
return name; |
|
73 |
} |
|
74 |
public void setName(String name) { |
|
75 |
this.name = name; |
|
76 |
} |
|
77 |
public String getSex() { |
|
78 |
return sex; |
|
79 |
} |
|
80 |
public void setSex(String sex) { |
|
81 |
this.sex = sex; |
|
82 |
} |
|
83 |
public boolean isState() { |
|
84 |
return state; |
|
85 |
} |
|
86 |
public void setState(boolean state) { |
|
87 |
this.state = state; |
|
88 |
} |
|
89 |
public Date getLastlogin() { |
|
90 |
return lastlogin; |
|
91 |
} |
|
92 |
public void setLastlogin(Date lastlogin) { |
|
93 |
this.lastlogin = lastlogin; |
|
94 |
} |
|
95 |
public UserType getUtype() { |
|
96 |
return utype; |
|
97 |
} |
|
98 |
public void setUtype(UserType utype) { |
|
99 |
this.utype = utype; |
|
100 |
} |
|
101 |
|
|
102 |
|
|
103 |
} |