package com.cool.store.enums.visit;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 拜访记录状态枚举类
 * </p>
 *
 * @author wangff
 * @since 2025/12/8
 */
@Getter
@AllArgsConstructor
public enum VisitStatusEnum {

    N_SIGN_IN(0, "待签到"),

    N_SIGN_OUT(1, "待签退"),

    COMPLETE(2, "已完成"),

    INVALID(3, "已失效"),
    ;
    
    private final Integer status;
    
    private final String desc;

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