# ServiceRequestCenterTypeEnum.java

    package cloud.wconnect.it.cons.servicerequestcenter;

    import lombok.AllArgsConstructor;
    import lombok.Getter;
    import org.apache.logging.log4j.util.Strings;

    import java.util.Arrays;

    /**
     *
     * @author: yyt
     * 2025-12-17
     */
    @Getter
    @AllArgsConstructor
    public enum ServiceRequestCenterTypeEnum {

        // 1.account, 2.it, 3.product
        ACCOUNT(1, "service-request-center.type.account"),
        IT(2, "service-request-center.type.it"),
        PRODUCT(3, "service-request-center.type.product");

        private final int code;
        private final String i18nCode;

        public static String getI18nCode(int code) {
            return Arrays.stream(ServiceRequestCenterTypeEnum.values())
                    .filter(item -> item.getCode() == code)
                    .findFirst()
                    .map(ServiceRequestCenterTypeEnum::getI18nCode)
                    .orElse(Strings.EMPTY);
        }
    }