package com.sqsoft.mars.framework.domain;

import java.io.Serializable;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import java.util.Date;
import java.util.List;


/**
 * The persistent class for the syst_staff database table.
 * 
 */
@Entity
@Table(name="syst_staff")
@NamedQuery(name="SystStaff.findAll", query="SELECT s FROM SystStaff s")
public class SystStaff implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="STAFF_ID")
	@GenericGenerator(name="wch_STAFF_ID_GENERATOR", strategy="uuid")
	@GeneratedValue(generator="wch_STAFF_ID_GENERATOR")
	private String staffId;

	@Column(name="ALLOW_LOGIN")
	private String allowLogin;

	@Column(name="BIRTHDAY")
	private String birthday;

	@Column(name="CODE")
	private String code;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")
	private Date createTime;

	@Column(name="EMAIL")
	private String email;

	@Column(name="GENDER")
	private String gender;

	@Column(name="LAST_NAME")
	private String lastName;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="LOCK_TIME")
	private Date lockTime;

	@Column(name="PASSWD_CHANGED")
	private String passwdChanged;

	@Column(name="PASSWORD")
	private String password;

	@Column(name="REMARK")
	private String remark;

	@Column(name="STAFF_NAME")
	private String staffName;

	@Column(name="STATE")
	private String state;

	@Column(name="USER_ID")
	private String userId;

	//bi-directional many-to-many association to SystRole
	@ManyToMany
	@JoinTable(
		name="syst_staff_role"
		, joinColumns={
			@JoinColumn(name="STAFF_ID")
			}
		, inverseJoinColumns={
			@JoinColumn(name="ROLE_ID")
			}
		)
	private List<SystRole> systRoles;

	public SystStaff() {
	}

	public String getStaffId() {
		return this.staffId;
	}

	public void setStaffId(String staffId) {
		this.staffId = staffId;
	}

	public String getAllowLogin() {
		return this.allowLogin;
	}

	public void setAllowLogin(String allowLogin) {
		this.allowLogin = allowLogin;
	}

	public String getBirthday() {
		return this.birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public Date getLockTime() {
		return this.lockTime;
	}

	public void setLockTime(Date lockTime) {
		this.lockTime = lockTime;
	}

	public String getPasswdChanged() {
		return this.passwdChanged;
	}

	public void setPasswdChanged(String passwdChanged) {
		this.passwdChanged = passwdChanged;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getStaffName() {
		return this.staffName;
	}

	public void setStaffName(String staffName) {
		this.staffName = staffName;
	}

	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public List<SystRole> getSystRoles() {
		return this.systRoles;
	}

	public void setSystRoles(List<SystRole> systRoles) {
		this.systRoles = systRoles;
	}

}