package com.sckw.payment.model.constant;

/**
 * 物流、贸易
 * 结算单状态枚举
 *
 * @author xucaiqin
 * @date 2023-07-11 12:00:52
 */
public enum SettlementEnum {
    ALL(0, "全部", "0"),
    WAITING_PAYMENT(1, "待结算", "1"),
    PARTIAL_PAYMENT(2, "部分结算", "2"),
    ALL_PAYMENT(3, "全部结算", "3");

    private final int status;
    private final String desc;
    private final String label;

    SettlementEnum(int status, String desc, String label) {
        this.status = status;
        this.desc = desc;
        this.label = label;
    }

    public String getLabel() {
        return label;
    }

    public int getStatus() {
        return status;
    }


    public String getDesc() {
        return desc;
    }

    // 添加静态方法，根据 status 获取对应的 desc
    public static String getStatusDesc(int status) {
        for (SettlementEnum settlementEnum : values()) {
            if (settlementEnum.getStatus() == status) {
                return settlementEnum.getDesc();
            }
        }
        // 可根据实际需求返回默认值或其他处理
        return null;
    }


}
