package com.hfkj.sysenum;

import java.util.Objects;

/**
 * @className: ProfitSharingReceiverRole
 * @author: HuRui
 * @date: 2023/2/27
 **/
public enum ProfitSharingReceiverRoleEnum {

    role1(1, "运营中心"),
    role2(2, "分公司"),
    role3(3, "代理商"),
    ;

    private Integer number;

    private String name;

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

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