|
@@ -0,0 +1,35 @@
|
|
|
+package com.fdkankan.fyun.constant;
|
|
|
+
|
|
|
+public enum FYunTypeEnum {
|
|
|
+ OSS("oss", "阿里云"),
|
|
|
+ AWS("aws", "亚马逊"),
|
|
|
+ LOCAL("local", "本地");
|
|
|
+
|
|
|
+ private String code;
|
|
|
+ private String message;
|
|
|
+
|
|
|
+ private FYunTypeEnum(String code, String message) {
|
|
|
+ this.code = code;
|
|
|
+ this.message = message;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String code() {
|
|
|
+ return code;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String message() {
|
|
|
+ return message;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static FYunTypeEnum get(String code) {
|
|
|
+ FYunTypeEnum[] values = FYunTypeEnum.values();
|
|
|
+ String enumValue = null;
|
|
|
+ for (FYunTypeEnum eachValue : values) {
|
|
|
+ enumValue = eachValue.code();
|
|
|
+ if (enumValue.equals(code)) {
|
|
|
+ return eachValue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+}
|