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

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @description: 业主审批设置
 * @author: 洪铭铭
 * @time: 2024/5/27 16:15
 */
@Getter
@AllArgsConstructor
public enum OwnerApproveTypeEnum {

    AUTO(1, "自动匹配业主列表"),

    MANUAL(2, "物业管理审批");

    private final int value;
    private final String desc;

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

}

