# TaRecordsStatusEnum.java

    package cloud.wconnect.finance.cons.ta;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

    import java.util.Arrays;
    import java.util.Optional;

    /**
     * Enum: TA Records Status
     *
     * @author zc
     * @date 2023/07/13
     */
    @Getter
    @AllArgsConstructor
    public enum TaRecordsStatusEnum {

        /**
         * Matched
         */
        MATCHED(1, "ta.status.matched"),

        /**
         * missTA
         */
        MISS_TA(2, "ta.status.miss-ta"),

        /**
         * missPMS
         */
        MISS_PMS(3, "ta.status.miss-pms"),

        /**
         * priceVariance
         */
        PRICE_VARIANCE(4, "ta.status.price-variance"),

        /**
         * TBA
         */
        TBA(5, "ta.status.tba"),

        /**
         * Ignore
         */
        IGNORE(6, "ta.status.ignore"),

        /**
         * notInPMS
         */
        NOT_IN_PMS(7, "ta.status.not-in-pms"),

        /**
         * ILWDP
         */
        ILWDP(8, "ta.status.ilwdp");

        /**
         * code
         */
        private final int code;

        /**
         * 国际化 code
         */
        private final String i18nCode;

        /**
         * 获取国际化 code
         *
         * @param code code
         * @return 国际化 code
         * @author zc
         * @date 2023/7/13
         */
        public static String getI18nCode(int code) {
            Optional<TaRecordsStatusEnum> optional = Arrays.stream(TaRecordsStatusEnum.values())
                    .filter(item -> item.getCode() == code).findFirst();
            return optional.isPresent() ? optional.get().getI18nCode() : "";
        }
    }