package com.yonge.cooleshow.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.yonge.toolset.base.enums.BaseEnum;

/**
 * 用户状态枚举类
 */
public enum UserLockFlag implements BaseEnum<Integer, UserLockFlag> {

	NORMAL(0, "正常"), LOCKED(1, "锁定");

	@EnumValue
	private int code;

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

	private String remark;

	public Integer getCode() {
		return code;
	}

	public String getRemark() {
		return remark;
	}

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