package com.qunzhixinxi.hnqz.admin.enums;

/**
 * 积分包完成情况枚举类
 *
 * @author lixuesong
 * @date 2021年05月30日 21:05
 */
public enum PackageFinishStatusEnum {

	/**
	 * 未完成
	 */
	NOT_COMPLETE("0", "未完成"),
	/**
	 * 已完成
	 */
	COMPLETED("1", "已完成"),

	STATUS_NULL("", "")
	;

	private String val;

	private String name;

	PackageFinishStatusEnum(String val, String name) {
		this.val = val;
		this.name = name;
	}

	public String val() {
		return this.val;
	}

	public String getName() {
		return this.name;
	}

	public static PackageFinishStatusEnum resolve(String val) {
		for (PackageFinishStatusEnum packageFinishStatusEnum: PackageFinishStatusEnum.values()){
			if (packageFinishStatusEnum.val.equals(val)){
				return packageFinishStatusEnum;
			}
		}
		return STATUS_NULL;
	}
}
