upper base lang field to timi-java for multilingual
This commit is contained in:
@ -1,29 +1,23 @@
|
|||||||
package com.imyeyu.spring.bean;
|
package com.imyeyu.spring.bean;
|
||||||
|
|
||||||
|
import com.imyeyu.java.bean.Language;
|
||||||
import com.imyeyu.java.ref.Ref;
|
import com.imyeyu.java.ref.Ref;
|
||||||
import com.imyeyu.spring.entity.UUIDEntity;
|
import com.imyeyu.spring.annotation.table.AutoUUID;
|
||||||
|
import com.imyeyu.spring.annotation.table.Id;
|
||||||
|
import com.imyeyu.spring.entity.Creatable;
|
||||||
|
import com.imyeyu.spring.entity.IDEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 夜雨
|
* @author 夜雨
|
||||||
* @since 2025-10-17 15:21
|
* @since 2025-10-17 15:21
|
||||||
*/
|
*/
|
||||||
public class Multilingual extends UUIDEntity {
|
public class Multilingual extends Language implements IDEntity<String>, Creatable {
|
||||||
|
|
||||||
protected String key;
|
@Id
|
||||||
|
@AutoUUID
|
||||||
|
protected String id;
|
||||||
|
|
||||||
protected String zhCN;
|
protected Long createdAt;
|
||||||
|
|
||||||
protected String zhTW;
|
|
||||||
|
|
||||||
protected String enUS;
|
|
||||||
|
|
||||||
protected String ruRU;
|
|
||||||
|
|
||||||
protected String koKR;
|
|
||||||
|
|
||||||
protected String jaJP;
|
|
||||||
|
|
||||||
protected String deDE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定语言值
|
* 获取指定语言值
|
||||||
@ -31,7 +25,7 @@ public class Multilingual extends UUIDEntity {
|
|||||||
* @param language 指定语言
|
* @param language 指定语言
|
||||||
* @return 值
|
* @return 值
|
||||||
*/
|
*/
|
||||||
public String getValue(com.imyeyu.java.bean.Language language) {
|
public String getValue(Language.Enum language) {
|
||||||
try {
|
try {
|
||||||
return Ref.getFieldValue(this, language.toString().replace("_", ""), String.class);
|
return Ref.getFieldValue(this, language.toString().replace("_", ""), String.class);
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
@ -39,67 +33,23 @@ public class Multilingual extends UUIDEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKey() {
|
@Override
|
||||||
return key;
|
public String getId() {
|
||||||
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKey(String key) {
|
@Override
|
||||||
this.key = key;
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getZhCN() {
|
@Override
|
||||||
return zhCN;
|
public Long getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setZhCN(String zhCN) {
|
@Override
|
||||||
this.zhCN = zhCN;
|
public void setCreatedAt(Long createdAt) {
|
||||||
}
|
this.createdAt = createdAt;
|
||||||
|
|
||||||
public String getZhTW() {
|
|
||||||
return zhTW;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setZhTW(String zhTW) {
|
|
||||||
this.zhTW = zhTW;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEnUS() {
|
|
||||||
return enUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnUS(String enUS) {
|
|
||||||
this.enUS = enUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRuRU() {
|
|
||||||
return ruRU;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRuRU(String ruRU) {
|
|
||||||
this.ruRU = ruRU;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getKoKR() {
|
|
||||||
return koKR;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setKoKR(String koKR) {
|
|
||||||
this.koKR = koKR;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getJaJP() {
|
|
||||||
return jaJP;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJaJP(String jaJP) {
|
|
||||||
this.jaJP = jaJP;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDeDE() {
|
|
||||||
return deDE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeDE(String deDE) {
|
|
||||||
this.deDE = deDE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user