¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.generator.domain; |
| | | |
| | | import java.util.List; |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotBlank; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import com.ruoyi.common.constant.GenConstants; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | |
| | | /** |
| | | * ä¸å¡è¡¨ gen_table |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class GenTable extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ç¼å· */ |
| | | private Long tableId; |
| | | |
| | | /** 表åç§° */ |
| | | @NotBlank(message = "表åç§°ä¸è½ä¸ºç©º") |
| | | private String tableName; |
| | | |
| | | /** 表æè¿° */ |
| | | @NotBlank(message = "表æè¿°ä¸è½ä¸ºç©º") |
| | | private String tableComment; |
| | | |
| | | /** å®ä½ç±»åç§°(é¦åæ¯å¤§å) */ |
| | | @NotBlank(message = "å®ä½ç±»åç§°ä¸è½ä¸ºç©º") |
| | | private String className; |
| | | |
| | | /** 使ç¨ç模æ¿ï¼crudå表æä½ treeæ 表æä½ï¼ */ |
| | | private String tplCategory; |
| | | |
| | | /** çæå
è·¯å¾ */ |
| | | @NotBlank(message = "çæå
è·¯å¾ä¸è½ä¸ºç©º") |
| | | private String packageName; |
| | | |
| | | /** çææ¨¡åå */ |
| | | @NotBlank(message = "çææ¨¡ååä¸è½ä¸ºç©º") |
| | | private String moduleName; |
| | | |
| | | /** çæä¸å¡å */ |
| | | @NotBlank(message = "çæä¸å¡åä¸è½ä¸ºç©º") |
| | | private String businessName; |
| | | |
| | | /** çæåè½å */ |
| | | @NotBlank(message = "çæåè½åä¸è½ä¸ºç©º") |
| | | private String functionName; |
| | | |
| | | /** çæä½è
*/ |
| | | @NotBlank(message = "ä½è
ä¸è½ä¸ºç©º") |
| | | private String functionAuthor; |
| | | |
| | | /** 主é®ä¿¡æ¯ */ |
| | | private GenTableColumn pkColumn; |
| | | |
| | | /** 表åä¿¡æ¯ */ |
| | | @Valid |
| | | private List<GenTableColumn> columns; |
| | | |
| | | /** å
¶å®çæé项 */ |
| | | private String options; |
| | | |
| | | /** æ ç¼ç åæ®µ */ |
| | | private String treeCode; |
| | | |
| | | /** æ ç¶ç¼ç åæ®µ */ |
| | | private String treeParentCode; |
| | | |
| | | /** æ åç§°åæ®µ */ |
| | | private String treeName; |
| | | |
| | | public Long getTableId() |
| | | { |
| | | return tableId; |
| | | } |
| | | |
| | | public void setTableId(Long tableId) |
| | | { |
| | | this.tableId = tableId; |
| | | } |
| | | |
| | | public String getTableName() |
| | | { |
| | | return tableName; |
| | | } |
| | | |
| | | public void setTableName(String tableName) |
| | | { |
| | | this.tableName = tableName; |
| | | } |
| | | |
| | | public String getTableComment() |
| | | { |
| | | return tableComment; |
| | | } |
| | | |
| | | public void setTableComment(String tableComment) |
| | | { |
| | | this.tableComment = tableComment; |
| | | } |
| | | |
| | | public String getClassName() |
| | | { |
| | | return className; |
| | | } |
| | | |
| | | public void setClassName(String className) |
| | | { |
| | | this.className = className; |
| | | } |
| | | |
| | | public String getTplCategory() |
| | | { |
| | | return tplCategory; |
| | | } |
| | | |
| | | public void setTplCategory(String tplCategory) |
| | | { |
| | | this.tplCategory = tplCategory; |
| | | } |
| | | |
| | | public String getPackageName() |
| | | { |
| | | return packageName; |
| | | } |
| | | |
| | | public void setPackageName(String packageName) |
| | | { |
| | | this.packageName = packageName; |
| | | } |
| | | |
| | | public String getModuleName() |
| | | { |
| | | return moduleName; |
| | | } |
| | | |
| | | public void setModuleName(String moduleName) |
| | | { |
| | | this.moduleName = moduleName; |
| | | } |
| | | |
| | | public String getBusinessName() |
| | | { |
| | | return businessName; |
| | | } |
| | | |
| | | public void setBusinessName(String businessName) |
| | | { |
| | | this.businessName = businessName; |
| | | } |
| | | |
| | | public String getFunctionName() |
| | | { |
| | | return functionName; |
| | | } |
| | | |
| | | public void setFunctionName(String functionName) |
| | | { |
| | | this.functionName = functionName; |
| | | } |
| | | |
| | | public String getFunctionAuthor() |
| | | { |
| | | return functionAuthor; |
| | | } |
| | | |
| | | public void setFunctionAuthor(String functionAuthor) |
| | | { |
| | | this.functionAuthor = functionAuthor; |
| | | } |
| | | |
| | | public GenTableColumn getPkColumn() |
| | | { |
| | | return pkColumn; |
| | | } |
| | | |
| | | public void setPkColumn(GenTableColumn pkColumn) |
| | | { |
| | | this.pkColumn = pkColumn; |
| | | } |
| | | |
| | | public List<GenTableColumn> getColumns() |
| | | { |
| | | return columns; |
| | | } |
| | | |
| | | public void setColumns(List<GenTableColumn> columns) |
| | | { |
| | | this.columns = columns; |
| | | } |
| | | |
| | | public String getOptions() |
| | | { |
| | | return options; |
| | | } |
| | | |
| | | public void setOptions(String options) |
| | | { |
| | | this.options = options; |
| | | } |
| | | |
| | | public String getTreeCode() |
| | | { |
| | | return treeCode; |
| | | } |
| | | |
| | | public void setTreeCode(String treeCode) |
| | | { |
| | | this.treeCode = treeCode; |
| | | } |
| | | |
| | | public String getTreeParentCode() |
| | | { |
| | | return treeParentCode; |
| | | } |
| | | |
| | | public void setTreeParentCode(String treeParentCode) |
| | | { |
| | | this.treeParentCode = treeParentCode; |
| | | } |
| | | |
| | | public String getTreeName() |
| | | { |
| | | return treeName; |
| | | } |
| | | |
| | | public void setTreeName(String treeName) |
| | | { |
| | | this.treeName = treeName; |
| | | } |
| | | |
| | | public boolean isTree() |
| | | { |
| | | return isTree(this.tplCategory); |
| | | } |
| | | |
| | | public static boolean isTree(String tplCategory) |
| | | { |
| | | return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory); |
| | | } |
| | | |
| | | public boolean isCrud() |
| | | { |
| | | return isCrud(this.tplCategory); |
| | | } |
| | | |
| | | public static boolean isCrud(String tplCategory) |
| | | { |
| | | return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory); |
| | | } |
| | | |
| | | public boolean isSuperColumn(String javaField) |
| | | { |
| | | return isSuperColumn(this.tplCategory, javaField); |
| | | } |
| | | |
| | | public static boolean isSuperColumn(String tplCategory, String javaField) |
| | | { |
| | | if (isTree(tplCategory)) |
| | | { |
| | | return StringUtils.equalsAnyIgnoreCase(javaField, |
| | | ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY)); |
| | | } |
| | | return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY); |
| | | } |
| | | } |