package com.microservices.pms.product.domain.enums;

import lombok.Getter;

/**
 * 产品需求状态
 *
 * @author OTTO
 */
@Getter
public enum ProductReqReviewStatus {
    PASS("pass", "已通过"),
    REJECTED("rejected", "已拒绝");
    private final String key;
    private final String name;

    ProductReqReviewStatus(String key, String name) {
        this.key = key;
        this.name = name;
    }

    public static String getNameByKey(String operation) {
        for (ProductReqReviewStatus status : values()) {
            if (status.getKey().equals(operation)) {
                return status.getName();
            }
        }
        return null;
    }
}
