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

/**
 * @author Walker
 * Created on 2020/9/16
 */
public enum CloudFilmOrderStatusEnum {

    UNKNOWN("", 0),
    UNPAID("待支付", 1),
    PAID("支付成功", 2),
    WRITE_BACK("已回写", 3),
    REFUND("已退费", 4);

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static CloudFilmOrderStatusEnum valueOf(int value) {
        for (CloudFilmOrderStatusEnum e : CloudFilmOrderStatusEnum.values()) {
            if (e.getValue() == value) {
                return e;
            }
        }
        return UNKNOWN;
    }
}