GenConstants.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package com.ruoyi.common.constant;
  2. /**
  3. * 代码生成通用常量
  4. *
  5. * @author ruoyi
  6. */
  7. public class GenConstants {
  8. /**
  9. * 树编码字段
  10. */
  11. public static final String TREE_CODE = "treeCode";
  12. /**
  13. * 树父编码字段
  14. */
  15. public static final String TREE_PARENT_CODE = "treeParentCode";
  16. /**
  17. * 树名称字段
  18. */
  19. public static final String TREE_NAME = "treeName";
  20. /**
  21. * 上级菜单ID字段
  22. */
  23. public static final String PARENT_MENU_ID = "parentMenuId";
  24. /**
  25. * 上级菜单名称字段
  26. */
  27. public static final String PARENT_MENU_NAME = "parentMenuName";
  28. /**
  29. * 数据库字符串类型
  30. */
  31. public static final String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"};
  32. /**
  33. * 数据库文本类型
  34. */
  35. public static final String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};
  36. /**
  37. * 数据库时间类型
  38. */
  39. public static final String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};
  40. /**
  41. * 数据库数字类型
  42. */
  43. public static final String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
  44. "bit", "bigint", "float", "double", "decimal"};
  45. /**
  46. * 页面不需要编辑字段
  47. */
  48. public static final String[] COLUMNNAME_NOT_EDIT = {"id", "create_by", "create_time", "del_flag"};
  49. /**
  50. * 页面不需要显示的列表字段
  51. */
  52. public static final String[] COLUMNNAME_NOT_LIST = {"id", "create_by", "create_time", "del_flag", "update_by",
  53. "update_time"};
  54. /**
  55. * 页面不需要查询字段
  56. */
  57. public static final String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by",
  58. "update_time", "remark"};
  59. /**
  60. * Entity基类字段
  61. */
  62. public static final String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime", "remark"};
  63. /**
  64. * Tree基类字段
  65. */
  66. public static final String[] TREE_ENTITY = {"parentName", "parentId", "orderNum", "ancestors", "children"};
  67. /**
  68. * 字符串类型
  69. */
  70. public static final String TYPE_STRING = "String";
  71. /**
  72. * 整型
  73. */
  74. public static final String TYPE_INTEGER = "Integer";
  75. /**
  76. * 长整型
  77. */
  78. public static final String TYPE_LONG = "Long";
  79. /**
  80. * 浮点型
  81. */
  82. public static final String TYPE_DOUBLE = "Double";
  83. /**
  84. * 高精度计算类型
  85. */
  86. public static final String TYPE_BIGDECIMAL = "BigDecimal";
  87. /**
  88. * 时间类型
  89. */
  90. public static final String TYPE_DATE = "Date";
  91. }