GenConstants.java 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. package com.ruoyi.common.constant;
  2. /**
  3. * 代码生成通用常量
  4. *
  5. * @author ruoyi
  6. */
  7. public class GenConstants
  8. {
  9. /** 单表(增删改查) */
  10. public static final String TPL_CRUD = "crud";
  11. /** 树表(增删改查) */
  12. public static final String TPL_TREE = "tree";
  13. /** 主子表(增删改查) */
  14. public static final String TPL_SUB = "sub";
  15. /** 树编码字段 */
  16. public static final String TREE_CODE = "treeCode";
  17. /** 树父编码字段 */
  18. public static final String TREE_PARENT_CODE = "treeParentCode";
  19. /** 树名称字段 */
  20. public static final String TREE_NAME = "treeName";
  21. /** 上级菜单ID字段 */
  22. public static final String PARENT_MENU_ID = "parentMenuId";
  23. /** 上级菜单名称字段 */
  24. public static final String PARENT_MENU_NAME = "parentMenuName";
  25. /** 数据库字符串类型 */
  26. public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
  27. /** 数据库文本类型 */
  28. public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
  29. /** 数据库时间类型 */
  30. public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
  31. /** 数据库数字类型 */
  32. public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
  33. "bit", "bigint", "float", "double", "decimal" };
  34. /** 页面不需要编辑字段 */
  35. public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
  36. /** 页面不需要显示的列表字段 */
  37. public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by",
  38. "update_time" };
  39. /** 页面不需要查询字段 */
  40. public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
  41. "update_time", "remark" };
  42. /** Entity基类字段 */
  43. public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
  44. /** Tree基类字段 */
  45. public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };
  46. /** 文本框 */
  47. public static final String HTML_INPUT = "input";
  48. /** 文本域 */
  49. public static final String HTML_TEXTAREA = "textarea";
  50. /** 下拉框 */
  51. public static final String HTML_SELECT = "select";
  52. /** 单选框 */
  53. public static final String HTML_RADIO = "radio";
  54. /** 复选框 */
  55. public static final String HTML_CHECKBOX = "checkbox";
  56. /** 日期控件 */
  57. public static final String HTML_DATETIME = "datetime";
  58. /** 图片上传控件 */
  59. public static final String HTML_IMAGE_UPLOAD = "imageUpload";
  60. /** 文件上传控件 */
  61. public static final String HTML_FILE_UPLOAD = "fileUpload";
  62. /** 富文本控件 */
  63. public static final String HTML_EDITOR = "editor";
  64. /** 字符串类型 */
  65. public static final String TYPE_STRING = "String";
  66. /** 整型 */
  67. public static final String TYPE_INTEGER = "Integer";
  68. /** 长整型 */
  69. public static final String TYPE_LONG = "Long";
  70. /** 浮点型 */
  71. public static final String TYPE_DOUBLE = "Double";
  72. /** 高精度计算类型 */
  73. public static final String TYPE_BIGDECIMAL = "BigDecimal";
  74. /** 时间类型 */
  75. public static final String TYPE_DATE = "Date";
  76. /** 模糊查询 */
  77. public static final String QUERY_LIKE = "LIKE";
  78. /** 相等查询 */
  79. public static final String QUERY_EQ = "EQ";
  80. /** 需要 */
  81. public static final String REQUIRE = "1";
  82. }