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

/**
 * 大陆销售薪资手动操作薪资类型
 *
 * @author luke
 * @create 2025/07/07
 */
public enum SalesCommissionManualType {


    BASIC_SALARY(1, "BASIC_SALARY"),
    KPI(2, "KPI"),
    PERSONAL_VOLUME(3, "PERSONAL_VOLUME"),
    TEAM_VOLUME(4, "TEAM_VOLUME");

    private final Integer code;
    private final String desc;

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

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

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


}
