package com.cool.store.enums;

/**
 * @Author: WangShuo
 * @Date: 2024/10/10/上午10:36
 * @Version 1.0
 * @注释:
 */
public enum PlatformBuildEnum {
    DOU_YIN(1,"抖音团购"),
    KUAI_SHOU(2,"快手团购"),
    MEI_TUAN_TUAN_GOU(3,"美团团购"),
    E_LE_ME(4,"饿了么外卖"),
    MEI_TUAN_WAI_MAI(5,"美团外卖"),
    YING_ZHANG_TONG(6,"营帐通"),
    JING_DONG_WAI_MAI(7,"京东外卖"),;
    private Integer code;
    private String message;
     PlatformBuildEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }

    public static String getMessageByCode(Integer code) {
        for (PlatformBuildEnum value : PlatformBuildEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getMessage();
            }
        }
        return null; // 或者抛出异常
    }

}
