package com.ruoyi.erp.domain;

import java.io.IOException; /**
 * 单位
 */
public enum PurpleUnit {
    EMPTY, PURPLE, UNIT;

    public String toValue() {
        switch (this) {
            case EMPTY: return "\u5929";
            case PURPLE: return "\u5e74";
            case UNIT: return "\u6708";
        }
        return null;
    }

    public static PurpleUnit forValue(String value) throws IOException {
        if (value.equals("\u5929")) return EMPTY;
        if (value.equals("\u5e74")) return PURPLE;
        if (value.equals("\u6708")) return UNIT;
        throw new IOException("Cannot deserialize PurpleUnit");
    }
}
