package com.clx.performance.enums.integral;

import lombok.AllArgsConstructor;
import lombok.Getter;

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

public enum IntegralTruckRuleEnum {
    ;
    @Getter
    @AllArgsConstructor
    public enum Status{
        OPEN(1, "开启"),
        CLOSE(2, "关闭"),

        ;

        private final Integer code;
        private final String msg;
        public static Optional<Status> getByCode(int code) {
            return Arrays.stream(values()).filter(e -> e.code == code).findFirst();
        }
    }


}
