package com.mandi.system.persist; import java.io.Serializable; import java.util.Date; import javax.persistence.*; import javax.validation.constraints.NotNull; import org.apache.commons.lang3.StringUtils; @Entity @Table(name="fd_login_log") public class Login implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.AUTO) private long id; @NotNull(message="登录用户名不能为空") private String username; private String ipaddr; private String macaddr; @Temporal(TemporalType.TIMESTAMP) private Date logintime=new Date(); @Temporal(TemporalType.TIMESTAMP) private Date logouttime; @Enumerated(EnumType.STRING) private LoginSide loginside; private String note; private String userid; private String workername; private String workerno; private long depart;//部门 private String departname;//部门名字 private String departno; private String phone; private long sysDepartID; private String sysDepartName; private String sdepartNo;//系统部门编号 @Transient private boolean isFdAdmin; public static long getSerialVersionUID() { return serialVersionUID; } public boolean isFdAdmin() { return isFdAdmin; } public void setFdAdmin(boolean fdAdmin) { isFdAdmin = fdAdmin; } /** * notice:this is not the user's id,only log's id * @return */ public long getId() { return id; } public void setId(long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = StringUtils.trim(username); } public Date getLogintime() { return logintime; } public void setLogintime(Date logintime) { this.logintime = logintime; } public Date getLogouttime() { return logouttime; } public void setLogouttime(Date logouttime) { this.logouttime = logouttime; } public LoginSide getLoginside() { return loginside; } public void setLoginside(LoginSide loginside) { this.loginside = loginside; } public String getUserid() { return userid; } public void setUserid(String userid) { this.userid = userid; } public long getDepart() { return depart; } public void setDepart(long depart) { this.depart = depart; } public String getIpaddr() { return ipaddr; } public void setIpaddr(String ipaddr) { this.ipaddr = StringUtils.trim(ipaddr); } public String getMacaddr() { return macaddr; } public void setMacaddr(String macaddr) { this.macaddr = StringUtils.trim(macaddr); } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public String getDepartname() { return departname; } public void setDepartname(String departname) { this.departname = departname; } public String getWorkername() { return workername; } public void setWorkername(String workername) { this.workername = workername; } public long getSysDepartID() { return sysDepartID; } public void setSysDepartID(long sysDepartID) { this.sysDepartID = sysDepartID; } public String getSysDepartName() { return sysDepartName; } public void setSysDepartName(String sysDepartName) { this.sysDepartName = sysDepartName; } public String getSdepartNo() { return sdepartNo; } public void setSdepartNo(String sdepartNo) { this.sdepartNo = sdepartNo; } public String getWorkerno() { return workerno; } public void setWorkerno(String workerno) { this.workerno = workerno; } public String getDepartno() { return departno; } public void setDepartno(String departno) { this.departno = departno; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } }