package com.hfkj.sysenum.merchant;

import java.util.Objects;

/**
 * @className: MerchantStatusEnum
 * @author: HuRui
 * @date: 2024/3/4
 **/
public enum MerchantStatusEnum {
    /**
     * 删除
     */
    status0(0, "删除"),
    /**
     * 正常
     */
    status1(1, "正常"),
    /**
     * 禁用
     */
    status2(2, "禁用"),
    ;

    private Integer number;

    private String name;

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

    public static MerchantStatusEnum getNameByType(Integer type) {
        for (MerchantStatusEnum 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;
    }
}
