package com.cool.store.enums.visit;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 预约到店状态
 */
@Getter
@AllArgsConstructor
public enum StoreVisitReservationStatusEnum {

    WAIT_CONFIRM(10, "待确认"),
    WAIT_VISIT(20, "待看店"),
    ARRIVED(30, "已到店"),
    CANCELED(40, "已取消");

    private final Integer status;
    private final String desc;

    public static boolean isValid(Integer status) {
        if (status == null) {
            return false;
        }
        for (StoreVisitReservationStatusEnum value : values()) {
            if (value.status.equals(status)) {
                return true;
            }
        }
        return false;
    }
}
