package com.cool.store.enums.closeup;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 歇业申请单状态
 * </p>
 *
 * @author wangff
 * @since 2026/4/8
 */
@Getter
@AllArgsConstructor
public enum CloseUpStatusEnum {
    APPROVAL(1, "审批中"),
    REJECTED(5, "审批拒绝"),
    PASS(10, "审批通过"),

    APPLY_OPEN(15, "申请营业中"),
    APPLY_OPEN_REJECTED(20, "申请营业审批拒绝"),
    APPLY_OPEN_PASS(25, "申请营业审批通过"),
    ;

    private final Integer status;

    private final String desc;

    public static String getDesc(Integer status) {
        for (CloseUpStatusEnum value : CloseUpStatusEnum.values()) {
            if (value.status.equals(status)) {
                return value.desc;
            }
        }
        return null;
    }

    public static boolean unPass(Integer status) {
        return REJECTED.getStatus().equals(status) || APPROVAL.getStatus().equals(status);
    }
}
