auditing.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. ),
  70. 'version_id' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '版本',
  74. 'default' => '',
  75. 'desc' => '版本',
  76. 'match' => 'is_numeric',
  77. //'search' => 'order,fulltext',
  78. 'update' => 'checkbox',
  79. 'option' => $version,
  80. 'list' => true,
  81. ),
  82. 'user_id' => array
  83. (
  84. 'type' => 'int-11',
  85. 'name' => '用户',
  86. 'default' => '',
  87. 'desc' => '用户',
  88. 'match' => 'is_numeric',
  89. //'search' => 'order,fulltext',
  90. 'update' => 'select',
  91. 'option' => $user,
  92. 'list' => true,
  93. ),
  94. 'auditid' => array
  95. (
  96. 'type' => 'varchar-40',
  97. 'name' => '审核id',
  98. 'default' => '',
  99. 'desc' => '审核id',
  100. 'match' => 'option',
  101. 'update' => 'text',
  102. 'list' => true,
  103. 'edit' => true,
  104. ),
  105. 'result' => array
  106. (
  107. 'type' => 'text-255',
  108. 'name' => '微信返回信息',
  109. 'default' => '',
  110. 'desc' => '微信返回信息',
  111. 'match' => 'option',
  112. 'update' => 'textarea',
  113. 'list' => true,
  114. 'modal' => '查看详情',
  115. ),
  116. 'status' => array
  117. (
  118. 'type' => 'tinyint-1',
  119. 'name' => '审核状态',
  120. 'default' => '1',
  121. 'desc' => '审核状态',
  122. 'match' => 'is_numeric',
  123. 'update' => 'select',
  124. 'option' => $status,
  125. //'list' => true,
  126. //'edit' => true,
  127. ),
  128. 'statusDesc' => array
  129. (
  130. 'type' => 'varchar-40',
  131. 'name' => '审核说明',
  132. 'default' => '',
  133. 'desc' => '审核说明',
  134. 'match' => 'option',
  135. 'update' => 'textarea',
  136. 'list' => 'Dever::load("component/auditing.view", {id})',
  137. ),
  138. 'state' => array
  139. (
  140. 'type' => 'tinyint-1',
  141. 'name' => '状态',
  142. 'default' => '1',
  143. 'desc' => '请选择状态',
  144. 'match' => 'is_numeric',
  145. ),
  146. 'mdate' => array
  147. (
  148. 'type' => 'int-11',
  149. 'name' => '审核时间',
  150. 'match' => array('is_numeric', time()),
  151. 'desc' => '',
  152. 'default' => '',
  153. 'list' => 'date("Y-m-d H:i:s", {mdate})',
  154. ),
  155. 'cdate' => array
  156. (
  157. 'type' => 'int-11',
  158. 'name' => '提交时间',
  159. 'match' => array('is_numeric', time()),
  160. 'desc' => '',
  161. # 只有insert时才生效
  162. 'insert' => true,
  163. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  164. ),
  165. ),
  166. 'top' => Dever::config('base', 'component')->top,
  167. 'manage' => array
  168. (
  169. 'edit' => false,
  170. 'delete' => false,
  171. 'insert' => false,
  172. ),
  173. );