package com.crm.rely.backend.core.constant;

/**
 * 常用的状态管理
 *
 * @author y
 * @create 2022/1/21
 */
public enum SalesType {


    COMMON_SALES(1, "COMMON_SALES"),
    SALES_MANAGER(2, "SALES_MANAGER");


    private final Integer code;
    private final String desc;

    SalesType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static SalesType matchCode(Integer code) {
        for (SalesType type : SalesType.values()) {
            if (type.getCode() == code) {
                return type;
            }
        }
        return null;
    }


}
