package com.hfkj.sysenum;

import java.util.Objects;

/**
 * 支付码状态
 * @author hurui
 */
public enum PayQrCodeStatusEnum {
    status0(0, "删除"),
    status1(1, "正常"),
    status2(2, "停用"),
    ;

    private Integer number;

    private String name;

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

    public static PayQrCodeStatusEnum getDataByNumber(Integer number) {
        for (PayQrCodeStatusEnum ele : values()) {
            if (Objects.equals(number,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;
    }
}
