system.php 3.2 KB

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