User

package com.huaweisymantec.rmc.core.domain;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;

@Entity
public class User {

private int id;
private String username;
private String password;
private String tel;
private String mobilePhone;
private String note_mail;
private String web_mail;
private String realname;
private String hs_number;
private int role_id;
private String receive_notes;
private String receive_web;
private Set<RemoteClientPoint> remoteclientpoints=new HashSet<RemoteClientPoint>();
@Id
@GeneratedValue
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Column(nullable=false,length=30)
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@Column(nullable=false,length=30)
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Column(nullable=false,length=15)
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
@Column(nullable=false,length=15)
public String getMobilePhone() {
return mobilePhone;
}
public void setMobilePhone(String mobilePhone) {
this.mobilePhone = mobilePhone;
}
@Column(nullable=false,length=50)
public String getNote_mail() {
return note_mail;
}
public void setNote_mail(String noteMail) {
note_mail = noteMail;
}
@Column(nullable=false,length=50)
public String getWeb_mail() {
return web_mail;
}
public void setWeb_mail(String webMail) {
web_mail = webMail;
}
@Column(nullable=false,length=20)
public String getRealname() {
return realname;
}
public void setRealname(String realname) {
this.realname = realname;
}
@Column(nullable=false,length=15)
public String getHs_number() {
return hs_number;
}
public void setHs_number(String hsNumber) {
hs_number = hsNumber;
}

@OneToMany(mappedBy="user",cascade={CascadeType.ALL})
public Set<RemoteClientPoint> getRemoteclientpoints() {
return remoteclientpoints;
}
public void setRemoteclientpoints(Set<RemoteClientPoint> remoteclientpoints) {
this.remoteclientpoints = remoteclientpoints;
}
public String getReceive_notes() {
return receive_notes;
}
public void setReceive_notes(String receiveNotes) {
receive_notes = receiveNotes;
}
public String getReceive_web() {
return receive_web;
}
public void setReceive_web(String receiveWeb) {
receive_web = receiveWeb;
}
public int getRole_id() {
return role_id;
}
public void setRole_id(int roleId) {
role_id = roleId;
}




}

你可能感兴趣的:(Web)