首页>代码>基于百度人脸识别API的人脸识别信息收集微信小程序>/FaceRecognition-1.3-alpha/后端/人脸识别/src/com/hyj/bean/User.java
package com.hyj.bean;

/**
 * @Description User用户类: 用于存储人脸相关信息
 * @author hyjstart何永建 Email:heyongjian2333@163.com
 * @version 1.0
 */
public class User {
	private int id; // 用户标识id, 数据库中为主键
	private String face_id; // 人脸标识
	private String userName; // 用户姓名
	private String description; // 用户备注(描述)
	private String city; // 首次录入城市 
	private int count; // 已录入次数 
	// 时间戳:格林威治历1970-1-1 0到现在的时间差(java为毫秒数)
	private long lastTime; // 用户上一次刷脸时间
	// 无参和全参构造器
	public User() {
	}
	public User(int id, String face_id, String userName, String description, String city, int count, long lastTime) {
		this.id = id;
		this.face_id = face_id;
		this.userName = userName;
		this.description = description;
		this.city = city;
		this.count = count;
		this.lastTime = lastTime;
	}
	// getter和setter 
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getFace_id() {
		return face_id;
	}
	public void setFace_id(String face_id) {
		this.face_id = face_id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public long getLastTime() {
		return lastTime;
	}
	public void setLastTime(long lastTime) {
		this.lastTime = lastTime;
	}
	// toString() equals() Hashcode()
	@Override
	public String toString() {
		return "User [id=" + id + ", face_id=" + face_id + ", userName=" + userName + ", description=" + description
				+ ", city=" + city + ", count=" + count + ", lastTime=" + lastTime + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((city == null) ? 0 : city.hashCode());
		result = prime * result + count;
		result = prime * result + ((description == null) ? 0 : description.hashCode());
		result = prime * result + ((face_id == null) ? 0 : face_id.hashCode());
		result = prime * result + id;
		result = prime * result + (int) (lastTime ^ (lastTime >>> 32));
		result = prime * result + ((userName == null) ? 0 : userName.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		User other = (User) obj;
		if (city == null) {
			if (other.city != null)
				return false;
		} else if (!city.equals(other.city)) return false;
		if (count != other.count) return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (face_id == null) {
			if (other.face_id != null)
				return false;
		} else if (!face_id.equals(other.face_id))
			return false;
		if (id != other.id)
			return false;
		if (lastTime != other.lastTime)
			return false;
		if (userName == null) {
			if (other.userName != null)
				return false;
		} else if (!userName.equals(other.userName))
			return false;
		return true;
	}
	
}
最近下载更多
Wwz12345  LV8 2024年6月1日
Artanis  LV1 2023年11月14日
yinyun1985  LV14 2023年8月5日
879222655  LV6 2023年5月19日
fewfsdaf  LV4 2023年4月18日
jk-mack  LV5 2023年2月19日
快乐的程序员  LV25 2023年1月25日
akbar2020  LV9 2022年8月27日
yangzeyu  LV1 2022年4月28日
591231555  LV20 2022年4月18日
最近浏览更多
dushine  LV3 4月14日
tung123 3月12日
暂无贡献等级
微信网友_6955249237250048  LV5 2024年12月28日
lipanlong  LV10 2024年12月3日
fff2003  LV9 2024年9月20日
abdkfksdkf  LV16 2024年9月20日
897258976  LV8 2024年8月29日
ncyhhh  LV2 2024年6月7日
Wwz12345  LV8 2024年6月1日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友