package cn.superdesk.uniorder.common.enums.thirdpart.szhtxx.electronicInvoice;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 交付标志^_^0-不交付;1-交付邮箱;2-交付手机;3-手机邮箱都交付;默认:0
 * @Author: linjinyu
 * @CreateDate: 2022/3/11 下午4:13
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022/3/11 下午4:13
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public enum SzhtxxElectronicInvoiceFptxxBillSentSignEnum {

//	0-不交付;
//	1-交付邮箱;
//	2-交付手机;
//	3-手机邮箱都交付;
//	默认:0

	不交付(0, "不交付"),
	交付邮箱(1, "交付邮箱"),
	交付手机(2, "交付手机"),
	手机邮箱都交付(3, "手机邮箱都交付"),
	;

	private Integer key;
	private String desc;

	SzhtxxElectronicInvoiceFptxxBillSentSignEnum(Integer key, String desc) {
		this.key = key;
		this.desc = desc;
	}

	public Integer getKey() {
		return key;
	}

	public String getDesc() {
		return desc;
	}

	public static String getDesc(Integer key) {
		for (SzhtxxElectronicInvoiceFptxxBillSentSignEnum c : SzhtxxElectronicInvoiceFptxxBillSentSignEnum.values()) {
			if (c.key.equals(key)) {
				return c.getDesc();
			}
		}
		return null;
	}

	private static final Map<Integer, SzhtxxElectronicInvoiceFptxxBillSentSignEnum> LOOKUP = new HashMap<>();

	static {
		for (SzhtxxElectronicInvoiceFptxxBillSentSignEnum s : EnumSet.allOf(SzhtxxElectronicInvoiceFptxxBillSentSignEnum.class)) {
			LOOKUP.put(s.getKey(), s);
		}
	}

	public static SzhtxxElectronicInvoiceFptxxBillSentSignEnum get(Integer key) {
		return LOOKUP.get(key);
	}

}
