package com.keao.edu.auth.api.enums;

import com.keao.edu.common.enums.BaseEnum;

public enum UserLockFlag implements BaseEnum<Integer, UserLockFlag> {

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

	private int code;

	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;
	}
}
