package common.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Entity
public class User {

	private Long id;
	private String email;
	private String password;
	private String name;
	private Long role;
	private String roleName;
	private Long roleType;
	private String roleTypeName;
	private String auth;
	private String authExtend;
	private Boolean status;
	private Long parent;

    private Long modifyAccount;
    private Long createAccount;
	private Date modifyTime;
	private Date createTime;
	private Boolean delFlag;

	private Map<String,String> authdataDic;


	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getEmail() {
		return email;
	}

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

	public String getPassword() {
		return password;
	}

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

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getRole() {
		return role;
	}

	public void setRole(Long role) {
		this.role = role;
	}

	public Long getRoleType() {
		return roleType;
	}

	public void setRoleType(Long roleType) {
		this.roleType = roleType;
	}

	public Long getModifyAccount() {
		return modifyAccount;
	}

	public void setModifyAccount(Long modifyAccount) {
		this.modifyAccount = modifyAccount;
	}

	public Long getCreateAccount() {
		return createAccount;
	}

	public void setCreateAccount(Long createAccount) {
		this.createAccount = createAccount;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

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

	public Boolean getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(Boolean delFlag) {
		this.delFlag = delFlag;
	}

	@Transient
	public String getAuth() {
		return auth;
	}

	public void setAuth(String auth) {
		this.auth = auth;
	}

	@Transient
	public String getAuthExtend() {
		return authExtend;
	}

	public void setAuthExtend(String authExtend) {
		this.authExtend = authExtend;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	public String getRoleTypeName() {
		return roleTypeName;
	}

	public void setRoleTypeName(String roleTypeName) {
		this.roleTypeName = roleTypeName;
	}

	public String getRoleName() {

		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public Long getParent() {
		return parent;
	}

	public void setParent(Long parent) {
		this.parent = parent;
	}

	@Transient
	public Map<String, String> getAuthdataDic() {
		return authdataDic;
	}

	public void setAuthdataDic(Map<String, String> authdataDic) {
		this.authdataDic = authdataDic;
	}

	@Override
	public String toString() {
		return "User{" +
				"id=" + id +
				", email='" + email + '\'' +
				", password='" + password + '\'' +
				", name='" + name + '\'' +
				", role=" + role +
				", roleName='" + roleName + '\'' +
				", roleType=" + roleType +
				", roleTypeName='" + roleTypeName + '\'' +
				", auth='" + auth + '\'' +
				", status=" + status +
				", parent=" + parent +
				", modifyAccount=" + modifyAccount +
				", createAccount=" + createAccount +
				", modifyTime=" + modifyTime +
				", createTime=" + createTime +
				", delFlag=" + delFlag +
				'}';
	}
}
