package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumCouponUnit {

    // 0:rmb分 1:小时
    MONEY(0, "单位：分(人民币)"),
    HOUR(1, "单位；小时")
    ;

    public static EnumCouponUnit getEnum(Integer code) {
        for (EnumCouponUnit value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumCouponUnit(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
