Files
ruoyi-java/ruoyi-system/src/main/java/com/ruoyi/erp/domain/TradeRule.java
2025-08-18 01:58:23 +08:00

23 lines
585 B
Java

package com.ruoyi.erp.domain;
import java.io.IOException; /**
* 交易规则
*/
public enum TradeRule {
YHB_ONLY, YHB_OPTIONAL;
public String toValue() {
switch (this) {
case YHB_ONLY: return "yhbOnly";
case YHB_OPTIONAL: return "yhbOptional";
}
return null;
}
public static TradeRule forValue(String value) throws IOException {
if (value.equals("yhbOnly")) return YHB_ONLY;
if (value.equals("yhbOptional")) return YHB_OPTIONAL;
throw new IOException("Cannot deserialize TradeRule");
}
}