@Column(nullable=false)
public boolean getAdmin() { return admin; }
public void setAdmin(boolean admin) { this.admin = admin; }
@Column(nullable=false, updatable=false)
public long getCreatedDate() { return createdDate; }
public void setCreatedDate(long createdDate) { this.createdDate = createdDate; }
@Column(nullable=false)
public int getEmailValidation() { return emailValidation; }
public void setEmailValidation(int emailValidation) { this.emailValidation = emailValidation; }
@Column(nullable=false)
public long getLockDate() { return lockDate; }
public void setLockDate(long lockDate) { this.lockDate = lockDate; }
@Transient
public boolean getEmailValidated() { return emailValidation==0; }
@Transient
public boolean getLocked() {
return !admin && lockDate>0 && lockDate>System.currentTimeMillis();
}
}
实体类PasswordTicket代表一个重置口令的请求:
@Entity
文章来源于领测软件测试网 https://www.ltesting.net/