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

/**
 * 销售入职状态
 *
 * @author y
 * @create 2022/1/21
 */
public enum SaleEntryType {


    TRIAL(1, "TRIAL"),
    EMPLOYEE(2, "EMPLOYEE");


    private final Integer code;
    private final String desc;

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

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

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


}
