package com.jeesharp.business.modules.common.enums;

import com.jeesharp.business.modules.common.enums.support.EnumValueSupport;
import com.jeesharp.business.modules.common.enums.support.StringValueEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 垂直业态预约/报名单支付状态，与各业态 {@code pay_status} 字段存储值一致。
 *
 * @author jeesharp
 * @since 2026-07-03
 */
@Getter
@AllArgsConstructor
public enum VerticalPayStatusEnum implements StringValueEnum {

    UNPAID("unpaid", "待支付"),
    PREPARING("preparing", "支付参数已生成"),
    PAID("paid", "已支付"),
    CLOSED("closed", "已关闭");

    private final String value;
    private final String desc;

    public static VerticalPayStatusEnum fromValue(String value) {
        return EnumValueSupport.fromStringValue(VerticalPayStatusEnum.class, value);
    }

    public static String getDescByValue(String value) {
        return EnumValueSupport.descByStringValue(VerticalPayStatusEnum.class, value);
    }
}
