system.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'system',
  6. # 显示给用户看的名称
  7. 'lang' => '项目管理',
  8. # 后台菜单排序
  9. 'order' => 1,
  10. 'end' => array
  11. (
  12. 'insert' => array
  13. (
  14. 'manage/top.sync',
  15. ),
  16. 'update' => array
  17. (
  18. 'manage/top.sync',
  19. ),
  20. ),
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. 'list' => true,
  33. 'order' => 'desc',
  34. ),
  35. 'name' => array
  36. (
  37. 'type' => 'varchar-32',
  38. 'name' => '项目名称',
  39. 'default' => '',
  40. 'desc' => '项目名称',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'search' => 'fulltext',
  44. 'list' => true,
  45. ),
  46. 'appid' => array
  47. (
  48. 'type' => 'varchar-150',
  49. 'name' => '微信appid',
  50. 'default' => '',
  51. 'desc' => '请输入微信appid',
  52. 'match' => 'option',
  53. 'search' => 'order,fulltext',
  54. 'update' => 'text',
  55. 'list' => 'table',
  56. 'modal' => '详细信息',
  57. ),
  58. 'secret' => array
  59. (
  60. 'type' => 'varchar-150',
  61. 'name' => '微信secret',
  62. 'default' => '',
  63. 'desc' => '请输入微信secret',
  64. 'match' => 'option',
  65. 'search' => 'order,fulltext',
  66. 'update' => 'text',
  67. //'list' => 'table',
  68. //'modal' => '详细信息',
  69. ),
  70. 'reorder' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '排序(数值越大越靠前)',
  74. 'default' => '1',
  75. 'desc' => '请输入排序',
  76. 'match' => 'option',
  77. 'update' => 'text',
  78. 'search' => 'order',
  79. 'list' => true,
  80. 'order' => 'desc',
  81. 'edit' => true,
  82. ),
  83. 'state' => array
  84. (
  85. 'type' => 'tinyint-1',
  86. 'name' => '状态',
  87. 'default' => '1',
  88. 'desc' => '请选择状态',
  89. 'match' => 'is_numeric',
  90. ),
  91. 'cdate' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '录入时间',
  95. 'match' => array('is_numeric', time()),
  96. 'desc' => '',
  97. # 只有insert时才生效
  98. 'insert' => true,
  99. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  100. ),
  101. ),
  102. # 默认值
  103. 'default' => array
  104. (
  105. 'col' => 'name,state,cdate',
  106. 'value' => array
  107. (
  108. '"默认项目",1,' . time(),
  109. ),
  110. ),
  111. 'manage' => array
  112. (
  113. 'insert' => false,
  114. 'edit' => false,
  115. # 自定义快捷新增和编辑
  116. 'button' => array
  117. (
  118. '新增' => array('fast'),
  119. ),
  120. # 快捷更新
  121. 'list_button' => array
  122. (
  123. 'edit' => array('编辑'),
  124. ),
  125. ),
  126. 'top' => array
  127. (
  128. # 数据来源
  129. 'data' => 'state',
  130. # 菜单名
  131. 'name' => '项目选择',
  132. # 默认值
  133. 'value' => 1,
  134. # 对应的字段值,设置这个之后,所有设置等于这个值的字段,都要遵循这个权限的控制
  135. 'key' => Dever::config('base')->top,
  136. # 本表中代表名称的字段
  137. 'col' => 'name',
  138. ),
  139. 'request' => array
  140. (
  141. 'getAll' => array
  142. (
  143. # 匹配的正则或函数 选填项
  144. 'option' => array
  145. (
  146. 'state' => 1,
  147. ),
  148. 'type' => 'all',
  149. 'order' => array('reorder' => 'desc','id' => 'desc'),
  150. 'col' => '*',
  151. ),
  152. ),
  153. );