package com.hfkj.sysenum;

import java.util.Objects;

/**
 * 分账指令类型
 * @className: MerLedgerStatusEnum
 * @author: HuRui
 * @date: 2023/4/18
 **/
public enum ProfitSharingCmdTypeEnum {
    CMD_TYPE_1(1, "分账"),
    CMD_TYPE_2(2, "分账撤销"),
    CMD_TYPE_3(3, "分账回退"),
    ;

    private Integer number;

    private String name;


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

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

}
