package cn.van.business.model.erp;

import java.io.IOException; /**
 * 验货费规则
 */
public enum AssumeRule {
    BUYER, SELLER;

    public String toValue() {
        switch (this) {
            case BUYER: return "buyer";
            case SELLER: return "seller";
        }
        return null;
    }

    public static AssumeRule forValue(String value) throws IOException {
        if (value.equals("buyer")) return BUYER;
        if (value.equals("seller")) return SELLER;
        throw new IOException("Cannot deserialize AssumeRule");
    }
}
