package com.qxueyou.scc.user.model;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import org.hibernate.annotations.GenericGenerator;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import javax.persistence.*;
|
import java.io.Serializable;
|
import java.util.Date;
|
import java.util.List;
|
|
|
/**
|
* Óû§±í ʵÌå
|
*
|
* @author ody.yuan
|
*/
|
@Entity(name = "User")
|
@Table(name = "user")
|
@NamedQuery(name = "User.findAll", query = "SELECT u FROM User u")
|
public class User implements Serializable, com.qxueyou.scc.base.model.ITrace {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* Ö÷¼ü
|
*/
|
@Id
|
@GeneratedValue(generator = "hibernate-uuid")
|
@GenericGenerator(name = "hibernate-uuid", strategy = "uuid")
|
@Column(name = "USER_ID", unique = true, nullable = false, length = 32)
|
private String userId;
|
|
/**
|
* ´´½¨ÕßID
|
*/
|
@Column(name = "CREATE_ID", nullable = false, length = 32)
|
@JsonIgnore
|
private String createId;
|
|
/**
|
* ´´½¨Ê±¼ä
|
*/
|
@Column(name = "CREATE_TIME", nullable = false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonIgnore
|
private Date createTime;
|
|
/**
|
* ´´½¨ÈË
|
*/
|
@Column(name = "CREATOR", nullable = false, length = 100)
|
@JsonIgnore
|
private String creator;
|
|
/**
|
* ɾ³ý±êÖ¾
|
*/
|
@Column(name = "DELETE_FLAG", nullable = false)
|
@JsonIgnore
|
private boolean deleteFlag;
|
|
/**
|
* Óû§Í·Ïñ·¾¶
|
*/
|
@Column(name = "IMG_PATH", length = 255)
|
private String imgPath;
|
|
/**
|
* ÊÖ»úºÅ
|
*/
|
@Column(name = "MOBILE_PHONE", length = 15)
|
private String mobilePhone;
|
|
/**
|
* À´Ô´
|
*/
|
@Column(name = "SOURCE", length = 16)
|
private String source;
|
|
/**
|
* ÓÊÏä
|
*/
|
@Column(name = "E_MAIL", length = 64)
|
private String email;
|
|
/**
|
* ΢²©ºÅ
|
*/
|
@Column(name = "AGE")
|
private Integer age;
|
|
/**
|
* ÐÕÃû
|
*/
|
@Column(name = "NAME", length = 150)
|
private String name;
|
|
/**
|
* µÇ¼Õ˺Å
|
*/
|
@Column(name = "ACCOUNT", length = 64)
|
private String account;
|
|
/**
|
* ÃÜÂë
|
*/
|
@Column(name = "PASSWORD", length = 255)
|
private String password;
|
|
/**
|
* ÐÞ¸ÄÈËID
|
*/
|
@Column(name = "UPDATE_ID", length = 32)
|
@JsonIgnore
|
private String updateId;
|
|
/**
|
* ÐÞ¸Äʱ¼ä
|
*/
|
@Column(name = "UPDATE_TIME", nullable = false)
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonIgnore
|
private Date updateTime;
|
|
/**
|
* ÐÞ¸ÄÈË
|
*/
|
@Column(name = "UPDATOR", length = 100)
|
@JsonIgnore
|
private String updator;
|
|
|
/**
|
* ÐÔ±ð
|
*/
|
@Column(name = "SEX")
|
private boolean sex;
|
|
|
/**
|
* °ó¶¨Õ˺ÅID
|
*/
|
@Column(name = "IMEI", length = 255)
|
private String imei;
|
|
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "users")
|
@JsonIgnore
|
private List<UserRole> roles;
|
|
@OneToMany(mappedBy = "user", fetch = FetchType.LAZY)
|
@JsonIgnore
|
private List<UserReRoleUser> userRoleRes;
|
|
@Column(name = "ORGANIZATION_ID", length = 32)
|
private String organizationId;
|
|
public List<UserRole> getRoles() {
|
return roles;
|
}
|
|
public void setRoles(List<UserRole> roles) {
|
this.roles = roles;
|
}
|
|
public String getAccount() {
|
return account;
|
}
|
|
public void setAccount(String account) {
|
this.account = account;
|
}
|
|
public String getOrganizationId() {
|
return organizationId;
|
}
|
|
public void setOrganizationId(String organizationId) {
|
this.organizationId = organizationId;
|
}
|
|
public boolean getSex() {
|
return sex;
|
}
|
|
public void setSex(boolean sex) {
|
this.sex = sex;
|
}
|
|
public String getUserId() {
|
return this.userId;
|
}
|
|
public void setUserId(String userId) {
|
this.userId = userId;
|
}
|
|
public String getCreateId() {
|
return this.createId;
|
}
|
|
public void setCreateId(String createId) {
|
this.createId = createId;
|
}
|
|
public Date getCreateTime() {
|
return this.createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public String getCreator() {
|
return this.creator;
|
}
|
|
public void setCreator(String creator) {
|
this.creator = creator;
|
}
|
|
public boolean getDeleteFlag() {
|
return this.deleteFlag;
|
}
|
|
public void setDeleteFlag(boolean deleteFlag) {
|
this.deleteFlag = deleteFlag;
|
}
|
|
public String getImgPath() {
|
return this.imgPath;
|
}
|
|
public void setImgPath(String imgPath) {
|
this.imgPath = imgPath;
|
}
|
|
public String getMobilePhone() {
|
return this.mobilePhone;
|
}
|
|
public void setMobilePhone(String mobilePhone) {
|
this.mobilePhone = mobilePhone;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public String getPassword() {
|
return this.password;
|
}
|
|
public void setPassword(String password) {
|
this.password = password;
|
}
|
|
public String getUpdateId() {
|
return this.updateId;
|
}
|
|
public void setUpdateId(String updateId) {
|
this.updateId = updateId;
|
}
|
|
public Date getUpdateTime() {
|
return this.updateTime;
|
}
|
|
public void setUpdateTime(Date updateTime) {
|
this.updateTime = updateTime;
|
}
|
|
public String getUpdator() {
|
return this.updator;
|
}
|
|
public void setUpdator(String updator) {
|
this.updator = updator;
|
}
|
|
public String getSource() {
|
return source;
|
}
|
|
public void setSource(String source) {
|
this.source = source;
|
}
|
|
public String getEmail() {
|
return email;
|
}
|
|
public void setEmail(String email) {
|
this.email = email;
|
}
|
|
public Integer getAge() {
|
return age;
|
}
|
|
public void setAge(Integer age) {
|
this.age = age;
|
}
|
|
public String getImei() {
|
return imei;
|
}
|
|
public void setImei(String imei) {
|
this.imei = imei;
|
}
|
|
public List<UserReRoleUser> getUserRoleRes() {
|
return userRoleRes;
|
}
|
|
public void setUserRoleRes(List<UserReRoleUser> userRoleRes) {
|
this.userRoleRes = userRoleRes;
|
}
|
|
|
@Override
|
public String toString() {
|
return "User [userId=" + userId + ", createId=" + createId + ", createTime=" + createTime + ", creator="
|
+ creator + ", deleteFlag=" + deleteFlag + ", imgPath=" + imgPath + ", mobilePhone=" + mobilePhone
|
+ ", source=" + source + ", email=" + email + ", age=" + age + ", name=" + name + ", account="
|
+ account + ", password=" + password + ", updateId=" + updateId + ", updateTime=" + updateTime
|
+ ", updator=" + updator + ", sex=" + sex
|
+ ", imei=" + imei + ", roles=" + roles + ", userRoleRes=" + userRoleRes + "]";
|
}
|
|
}
|