package com.hfkj.sysenum.merchant;

import java.util.Objects;

/**
 * @className: MerchantStatusEnum
 * @author: HuRui
 * @date: 2024/3/4
 **/
public enum MerchantQrCodeTypeEnum {
    type1(1, "综合二维码"),
    type2(2, "加油二维码"),
    type3(3, "商城二维码"),
    ;

    private Integer number;

    private String name;

    MerchantQrCodeTypeEnum(int number, String name) {
        this.number = number;
        this.name = name;
    }

    public static MerchantQrCodeTypeEnum getNameByType(Integer type) {
        for (MerchantQrCodeTypeEnum ele : values()) {
            if (Objects.equals(type,ele.getNumber())) {
                return ele;
            }
        }
        return null;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
