23 lines
550 B
Java
23 lines
550 B
Java
package com.ruoyi.erp.domain;
|
|
|
|
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");
|
|
}
|
|
}
|