GenConstants.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. 
  2. namespace ZR.CodeGenerator
  3. {
  4. /// <summary>
  5. /// 代码生成常量
  6. /// </summary>
  7. public class GenConstants
  8. {
  9. public static string Gen_conn = "gen:conn";
  10. public static string Gen_conn_dbType = "gen:dbType";
  11. public static string Gen_author = "gen:author";
  12. public static string Gen_autoPre = "gen:autoPre";
  13. public static string Gen_tablePrefix = "gen:tablePrefix";
  14. /// <summary>
  15. /// InputDto输入实体是不包含字段
  16. /// </summary>
  17. public static readonly string[] inputDtoNoField = new string[] { "createTime", "updateTime", "addtime", "create_time", "update_time" };
  18. /// <summary>
  19. /// 图片字段
  20. /// </summary>
  21. public static readonly string[] imageFiled = new string[] { "icon", "img", "image", "url", "pic", "photo", "avatar" };
  22. /// <summary>
  23. /// 下拉框字段
  24. /// </summary>
  25. public static readonly string[] selectFiled = new string[] { "status", "type", "state", "sex", "gender" };
  26. /// <summary>
  27. /// 单选按钮字段
  28. /// </summary>
  29. public static readonly string[] radioFiled = new string[] { "status", "state", "is"};
  30. /// <summary>
  31. /// 单表(增删改查)
  32. /// </summary>
  33. public static string TPL_CRUD = "crud";
  34. /// <summary>
  35. /// 树表(增删改查)
  36. /// </summary>
  37. public static string TPL_TREE = "tree";
  38. /// <summary>
  39. /// 主子表(增删改查)
  40. /// </summary>
  41. public static string TPL_SUB = "sub";
  42. /// <summary>
  43. /// 树编码字段
  44. /// </summary>
  45. public static string TREE_CODE = "treeCode";
  46. /// <summary>
  47. /// 树父编码字段
  48. /// </summary>
  49. public static string TREE_PARENT_CODE = "treeParentCode";
  50. /// <summary>
  51. /// 树名称字段
  52. /// </summary>
  53. public static string TREE_NAME = "treeName";
  54. /// <summary>
  55. /// 上级菜单ID字段
  56. /// </summary>
  57. public static string PARENT_MENU_ID = "parentMenuId";
  58. /// <summary>
  59. /// 上级菜单名称字段
  60. /// </summary>
  61. public static string PARENT_MENU_NAME = "parentMenuName";
  62. /** 数据库字符串类型 */
  63. public static string[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
  64. /** 数据库文本类型 */
  65. public static string[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
  66. /** 数据库时间类型 */
  67. public static string[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
  68. /** 页面不需要编辑字段 */
  69. public static string[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "delFlag" };
  70. /** 页面不需要显示的列表字段 */
  71. public static string[] COLUMNNAME_NOT_LIST = { "create_by", "create_time", "delFlag", "update_by",
  72. "update_time" , "password"};
  73. /** 页面不需要查询字段 */
  74. public static string[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "delFlag", "update_by",
  75. "update_time", "remark" };
  76. /** Entity基类字段 */
  77. public static string[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
  78. /** Tree基类字段 */
  79. public static string[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };
  80. /** 文本框 */
  81. public static string HTML_INPUT = "input";
  82. /** 数字框 */
  83. public static string HTML_INPUT_NUMBER = "inputNumber";
  84. /** 文本域 */
  85. public static string HTML_TEXTAREA = "textarea";
  86. /** 下拉框 */
  87. public static string HTML_SELECT = "select";
  88. /// <summary>
  89. /// 下拉多选
  90. /// </summary>
  91. public static string HTML_SELECT_MULTI = "selectMulti";
  92. /** 单选框 */
  93. public static string HTML_RADIO = "radio";
  94. /** 复选框 */
  95. public static string HTML_CHECKBOX = "checkbox";
  96. /** 日期控件 */
  97. public static string HTML_DATETIME = "datetime";
  98. /** 图片上传控件 */
  99. public static string HTML_IMAGE_UPLOAD = "imageUpload";
  100. /** 文件上传控件 */
  101. public static string HTML_FILE_UPLOAD = "fileUpload";
  102. /** 富文本控件 */
  103. public static string HTML_EDITOR = "editor";
  104. // 自定义排序
  105. public static string HTML_SORT = "sort";
  106. /// <summary>
  107. /// 自定义输入框
  108. /// </summary>
  109. public static string HTML_CUSTOM_INPUT = "customInput";
  110. //颜色选择器
  111. public static string HTML_COLORPICKER = "colorPicker";
  112. //switch开关
  113. public static string HTML_SWITCH { get; set; }
  114. /** 字符串类型 */
  115. public static string TYPE_STRING = "string";
  116. /** 整型 */
  117. public static string TYPE_INT = "int";
  118. /** 长整型 */
  119. public static string TYPE_LONG = "long";
  120. /** 浮点型 */
  121. public static string TYPE_DOUBLE = "Double";
  122. /** 时间类型 */
  123. public static string TYPE_DATE = "DateTime";
  124. /** 模糊查询 */
  125. public static string QUERY_LIKE = "LIKE";
  126. /** 需要 */
  127. public static string REQUIRE = "1";
  128. }
  129. }