package com.njcn.pojo.user;

import com.njcn.sso.pojo.user.User;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * PQS_Secretkey密码完整性判断表。储存用户密码的2次MD5加密值，以及每个用户分配的私有秘钥，验证的时候把【Md5-2】+【私有秘钥】
 * ，然后进行3des加密，跟之前的密码进行对比，假如对不上，则密码错误。
 */
@Table(name = "PQS_SECRETKEY")
public class SecretKey {

	@Id
	@Column(name = "SECRETKEY_INDEX")
	private String secretKeyIndex;
	
	@Column(name="USER_INDEX")
	private String userIndex;
	
	//工作秘钥
	@Column(name="SECRETKEY")
	private String secretKey;
	
	//Md5-2值
	@Column(name="STANDBY")
	private String standBy;
	@Transient
	private User uID;
	public User getuID() {
		return uID;
	}

	public void setuID(User uID) {
		this.uID = uID;
	}

	public String getSecretKeyIndex() {
		return secretKeyIndex;
	}

	public void setSecretKeyIndex(String secretKeyIndex) {
		this.secretKeyIndex = secretKeyIndex;
	}

	public String getUserIndex() {
		return userIndex;
	}

	public void setUserIndex(String userIndex) {
		this.userIndex = userIndex;
	}

	public String getSecretKey() {
		return secretKey;
	}

	public void setSecretKey(String secretKey) {
		this.secretKey = secretKey;
	}

	public String getStandBy() {
		return standBy;
	}

	public void setStandBy(String standBy) {
		this.standBy = standBy;
	}

	@Override
	public String toString() {
		return "SecretKey [secretKeyIndex=" + secretKeyIndex + ", userIndex=" + userIndex + ", secretKey=" + secretKey
				+ ", standBy=" + standBy + "]";
	}

	
	
}
