private long createdDate; // 创建时间
private long lockDate; // 锁定时间
public User() {}
public User(String username, String password, boolean admin, long lastSignOnDate) {
this.username = username;
this.password = password;
this.admin = admin;
}
@Id
@Column(updatable=false, length=20)
@Pattern(regex=REGEX_USERNAME)
public String getUsername() { return username; }
public void setUsername(String username) { this.username = username; }
@Column(nullable=false, length=32)
@Pattern(regex=REGEX_PASSWORD)
public String getPassword() { return password; }
public void setPassword(String password) { this.password = password; }
@Column(nullable=false, length=50)
@Pattern(regex=REGEX_EMAIL)
public String getEmail() { return email; }
public void setEmail(String email) { this.email = email; }
文章来源于领测软件测试网 https://www.ltesting.net/