package com.fs.store.enums;

import lombok.Getter;

@Getter
public enum IcgScheduleOperationTypeEnum {
    NORMAL("NORMAL"),
    ERROR("ERROR"),
    RETRY("RETRY");
    private final String code;

    IcgScheduleOperationTypeEnum(String code) {
        this.code = code;
    }


    public static IcgScheduleOperationTypeEnum fromCode(String code) {
        for (IcgScheduleOperationTypeEnum type : IcgScheduleOperationTypeEnum.values()) {
            if (type.getCode().equalsIgnoreCase(code)) {
                return type;
            }
        }
        return null;
    }

     @Override
    public String toString() {
        return code;
    }
}
