package com.ym.mec.auth.api.enums;

import com.ym.mec.common.enums.BaseEnum;

/** 
 * @author sunzl 
 * 2015年8月25日 下午4:19:00 
 * 会员状态枚举类
 */
public enum UserLockFlag implements BaseEnum<Integer, UserLockFlag> {

	NOACTIVATED(0, "正常"), CANCELLED(1, "冻结"), NORMAL(9, "锁定");

	private int code;

	private UserLockFlag(int code, String remark) {
		this.code = code;
		this.remark = remark;
	}

	private String remark;

	public Integer getCode() {
		return code;
	}

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

	public String getRemark() {
		return remark;
	}

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

	public static UserLockFlag codeOf(int code) {
		for (UserLockFlag userStatus : UserLockFlag.values()) {
			if (code == userStatus.getCode()) {
				return userStatus;
			}
		}
		return null;
	}
}
