# ServiceRequestCenterPriorityEnum.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 ServiceRequestCenterPriorityEnum {

        // 1.low 2.medium 3.high 4.urgent
        LOW(1, "service-request-center.priority.low"),
        MEDIUM(2, "service-request-center.priority.medium"),
        HIGH(3, "service-request-center.priority.high"),
        URGENT(4, "service-request-center.priority.urgent");

        private final int code;
        private final String i18nCode;

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