package com.iformall.enums;


/**
 * @author gongbiao
 */

public enum EnumPriceUnit {

    D(1,"日"),
    M(2,"月"),
    Y(3,"年"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
