package com.hfkj.sysenum;

import java.util.Objects;

/**
 * 转账创建方式
 * @className: TransferAccountsCreateType
 * @author: HuRui
 * @date: 2023/10/23
 **/
public enum TransferAccountsCreateType {
    type1(1, "系统自动"),
    type2(2, "API"),
    ;

    private Integer number;

    private String name;

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

    public static TransferAccountsCreateType getNameByNumber(Integer number) {
        for (TransferAccountsCreateType 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;
    }
}
