auditing.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?php
  2. /**
  3. * tester
  4. */
  5. $status = array
  6. (
  7. 1 => '审核中',
  8. 2 => '审核成功',
  9. 3 => '审核失败',
  10. );
  11. $user = function()
  12. {
  13. $array = array();
  14. $info = Dever::load('component/user-state');
  15. if($info)
  16. {
  17. $array += $info;
  18. }
  19. return $array;
  20. };
  21. $template = function()
  22. {
  23. $array = array();
  24. $info = Dever::load('component/template-state');
  25. if($info)
  26. {
  27. $array += $info;
  28. }
  29. return $array;
  30. };
  31. $version = function()
  32. {
  33. $array = array();
  34. $info = Dever::load('component/version-state');
  35. if($info)
  36. {
  37. $array += $info;
  38. }
  39. return $array;
  40. };
  41. return array
  42. (
  43. # 表名
  44. 'name' => 'auditing',
  45. # 显示给用户看的名称
  46. 'lang' => '审核历史',
  47. 'desc' => '这里会实时请求微信审核接口,访问速度会慢一些。后续放到cron里。',
  48. 'order' => 2,
  49. # 数据结构
  50. 'struct' => array
  51. (
  52. 'id' => array
  53. (
  54. 'type' => 'int-11',
  55. 'name' => 'ID',
  56. 'default' => '',
  57. 'desc' => '',
  58. 'match' => 'is_numeric',
  59. 'search' => 'order',
  60. //'list' => true,
  61. ),
  62. 'project_id' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '项目',
  66. 'default' => '',
  67. 'desc' => '请输入项目',
  68. 'match' => 'is_numeric',
  69. 'list' => true,
  70. 'edit' => true,
  71. ),
  72. 'version_id' => array
  73. (
  74. 'type' => 'int-11',
  75. 'name' => '版本',
  76. 'default' => '',
  77. 'desc' => '版本',
  78. 'match' => 'is_numeric',
  79. //'search' => 'order,fulltext',
  80. 'update' => 'checkbox',
  81. 'option' => $version,
  82. 'list' => true,
  83. ),
  84. 'user_id' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '用户',
  88. 'default' => '',
  89. 'desc' => '用户',
  90. 'match' => 'is_numeric',
  91. //'search' => 'order,fulltext',
  92. 'update' => 'select',
  93. 'option' => $user,
  94. 'list' => true,
  95. ),
  96. 'auditid' => array
  97. (
  98. 'type' => 'varchar-40',
  99. 'name' => '审核id',
  100. 'default' => '',
  101. 'desc' => '审核id',
  102. 'match' => 'option',
  103. 'update' => 'text',
  104. 'list' => true,
  105. 'edit' => true,
  106. ),
  107. 'result' => array
  108. (
  109. 'type' => 'text-255',
  110. 'name' => '微信返回信息',
  111. 'default' => '',
  112. 'desc' => '微信返回信息',
  113. 'match' => 'option',
  114. 'update' => 'textarea',
  115. 'list' => true,
  116. 'modal' => '查看详情',
  117. ),
  118. 'status' => array
  119. (
  120. 'type' => 'tinyint-1',
  121. 'name' => '审核状态',
  122. 'default' => '1',
  123. 'desc' => '审核状态',
  124. 'match' => 'is_numeric',
  125. 'update' => 'select',
  126. 'option' => $status,
  127. //'list' => true,
  128. //'edit' => true,
  129. ),
  130. 'statusDesc' => array
  131. (
  132. 'type' => 'varchar-40',
  133. 'name' => '审核说明',
  134. 'default' => '',
  135. 'desc' => '审核说明',
  136. 'match' => 'option',
  137. 'update' => 'textarea',
  138. 'list' => 'Dever::load("component/auditing.view", {id})',
  139. ),
  140. 'state' => array
  141. (
  142. 'type' => 'tinyint-1',
  143. 'name' => '状态',
  144. 'default' => '1',
  145. 'desc' => '请选择状态',
  146. 'match' => 'is_numeric',
  147. ),
  148. 'mdate' => array
  149. (
  150. 'type' => 'int-11',
  151. 'name' => '审核时间',
  152. 'match' => array('is_numeric', time()),
  153. 'desc' => '',
  154. 'default' => '',
  155. 'list' => 'date("Y-m-d H:i:s", {mdate})',
  156. ),
  157. 'cdate' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '提交时间',
  161. 'match' => array('is_numeric', time()),
  162. 'desc' => '',
  163. # 只有insert时才生效
  164. 'insert' => true,
  165. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  166. ),
  167. ),
  168. 'top' => Dever::config('base', 'component')->top,
  169. 'manage' => array
  170. (
  171. 'edit' => false,
  172. 'delete' => false,
  173. 'insert' => false,
  174. ),
  175. );