|
|
package model;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
/**
|
|
|
* @author Nisiyu
|
|
|
* @version 1.0
|
|
|
* @created 21-11月-2025 8:14:26
|
|
|
* 学号:2023210480 姓名:倪思羽
|
|
|
*/
|
|
|
public class Customer {
|
|
|
private String cid; // 客户编号
|
|
|
private String cname; // 客户姓名
|
|
|
private String cpin; // 密码
|
|
|
private LocalDateTime lidstetime; // 最后登录/锁定时间
|
|
|
private int fittmes; // 失败次数
|
|
|
private int lstimes; // 成功登录次数
|
|
|
private String gender; // 性别
|
|
|
|
|
|
public Customer() {
|
|
|
// 默认构造函数
|
|
|
}
|
|
|
|
|
|
public Customer(String cid, String cname, String cpin) {
|
|
|
this.cid = cid;
|
|
|
this.cname = cname;
|
|
|
this.cpin = cpin;
|
|
|
this.fittmes = 0;
|
|
|
this.lstimes = 0;
|
|
|
this.lidstetime = LocalDateTime.now();
|
|
|
}
|
|
|
|
|
|
// Getter 和 Setter 方法
|
|
|
public String getCid() {
|
|
|
return cid;
|
|
|
}
|
|
|
|
|
|
public void setCid(String cid) {
|
|
|
this.cid = cid;
|
|
|
}
|
|
|
|
|
|
public String getCname() {
|
|
|
return cname;
|
|
|
}
|
|
|
|
|
|
public void setCname(String cname) {
|
|
|
this.cname = cname;
|
|
|
}
|
|
|
|
|
|
public String getCpin() {
|
|
|
return cpin;
|
|
|
}
|
|
|
|
|
|
public void setCpin(String cpin) {
|
|
|
this.cpin = cpin;
|
|
|
}
|
|
|
|
|
|
public LocalDateTime getLidstetime() {
|
|
|
return lidstetime;
|
|
|
}
|
|
|
|
|
|
public void setLidstetime(LocalDateTime lidstetime) {
|
|
|
this.lidstetime = lidstetime;
|
|
|
}
|
|
|
|
|
|
public int getFittmes() {
|
|
|
return fittmes;
|
|
|
}
|
|
|
|
|
|
public void setFittmes(int fittmes) {
|
|
|
this.fittmes = fittmes;
|
|
|
}
|
|
|
|
|
|
public int getLstimes() {
|
|
|
return lstimes;
|
|
|
}
|
|
|
|
|
|
public void setLstimes(int lstimes) {
|
|
|
this.lstimes = lstimes;
|
|
|
}
|
|
|
|
|
|
public String getGender() {
|
|
|
return gender;
|
|
|
}
|
|
|
|
|
|
public void setGender(String gender) {
|
|
|
this.gender = gender;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取性别称呼(先生/女士)
|
|
|
*/
|
|
|
public String getGenderTitle() {
|
|
|
if ("男".equals(gender)) {
|
|
|
return "先生";
|
|
|
} else if ("女".equals(gender)) {
|
|
|
return "女士";
|
|
|
} else {
|
|
|
return "";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
return "Customer{cid='" + cid + "', cname='" + cname + "', gender='" + gender + "'}";
|
|
|
}
|
|
|
} |