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


/**
 * 订单状态枚举
 */
public enum OrderStatusEnum {
    UNKNOWN("",0),
    Pending_Payment("待支付", 10),
    Already_Paid("已支付", 20),
    Refunded("已退款", 30),
    Cancel("已取消", 40),
    Over("已结束", 50),
    PendingConfirm("待确认", 60),
    SubmitReport("已提交报告", 70),
    InformPatient("已通知用户", 80),
    Settlement("已结算", 90),
    Evaluate("已评价", 100);
    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static OrderStatusEnum getOrderStatus(int value){
        for(OrderStatusEnum statusEnum: OrderStatusEnum.values()){
            if(statusEnum.getValue() == value){
                return statusEnum;
            }
        }
        return UNKNOWN;
    }
}
