package com.yuchen.saas.park.api.enums.approve;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @description: 审批组
 * @author: 洪铭铭
 * @time: 2024/5/30 14:39
 */
@Getter
@AllArgsConstructor
public enum ApproveConfigGroupEnum {

    OWNER_APPROVE(1, "业主审核"),

    RESIDENT_APPROVE(2, "住户审核");

    private final int value;
    private final String desc;

    public static String getDescByCode(Integer value) {
        if (Objects.isNull(value)) {
            return "";
        }
        ApproveConfigGroupEnum[] enumArray = ApproveConfigGroupEnum.values();
        for (ApproveConfigGroupEnum e : enumArray) {
            if (e.getValue() == value) {
                return e.getDesc();
            }
        }
        return "";
    }

}

