package com.hfkj.sysenum;

import java.util.Objects;

/**
 * @className: StoreDiscountActivityEnum
 * @author: HuRui
 * @date: 2022/11/21
 **/
public enum StoreDiscountActivityPartakeWayEnum {
    type1(1, "交易"),
    type2(2, "分享"),
    type3(3, "扫码领券"),
    ;

    private Integer number;

    private String name;

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

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