package com.hai.enum_type;

import java.util.Objects;

/**
 * 渠道商支付平台类型
 */
public enum GasChannelPayPlatformType {
    type1(1 , "微信"),
    ;

    private Integer type;
    private String name;

    GasChannelPayPlatformType(int type , String name) {
        this.type = type;
        this.name = name;
    }

    public static GasChannelPayPlatformType getPlatformByType(Integer type) {
        for (GasChannelPayPlatformType ele : values()) {
            if(Objects.equals(type,ele.getType())) return ele;
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
