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

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


    TOTAL(1, "TOTAL"),
    DAY(2, "DAY"),
    WEEK(3, "WEEK"),
    MONTH(4, "MONTH");


    private final Integer code;
    private final String desc;

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

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

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


}
