package com.ywt.mg.domain.models.enums;

/**
 * 对应 check_result_order 表的 status 字段
 * 1-待支付，2-已支付，3-已回写，4-已退费
 */
public enum CheckResultOrderEnum {
    Unknown("未知", 0),
    Padding("待支付", 1),
    Finished("已支付", 2),
    HasWriteBack("已回写", 3),
    Refunded("已退费", 4);

    private final String displayName;

    private int value = 0;

    CheckResultOrderEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static CheckResultOrderEnum valueOf(int value) {
        switch (value) {
            case 1:
                return Padding;
            case 2:
                return Finished;
            case 3:
                return HasWriteBack;
            case 4:
                return Refunded;
            default:
                return Unknown;
        }
    }

}
