package com.ywt.mg.domain.models.enums;

/**
 * @author daiyihua
 * @create 2020-08-04 11:23
 * @program ywt_mg
 * @description ywt_log库的common_type表的枚举
 **/
public enum LogCommonTypeEnum {

    UnKnown("", ""),
    BillCheckLog("bill_check_log", "账单核对日志"),
    MonthCheckLog("month_check_log", "月度核对表日志"),
    CheckAgainLog("check_again_log", "账单回签日志");

    private final String typeCode;

    private final String typeDesc;

    LogCommonTypeEnum(String typeCode, String typeDesc) {
        this.typeCode = typeCode;
        this.typeDesc = typeDesc;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public String getTypeDesc() {
        return typeDesc;
    }

    public static LogCommonTypeEnum getTypeDesc(String typeCode) {
        switch (typeCode) {
            case "bill_check_log":
                return BillCheckLog;

            case "month_check_log":
                return MonthCheckLog;

            case "check_again_log":
                return CheckAgainLog;

            default:
                return UnKnown;
        }
    }
}
