user_report.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待审核',
  5. 2 => '审核通过',
  6. 3 => '审核未通过',
  7. );
  8. $num_status = array
  9. (
  10. 1 => '未入账',
  11. 2 => '已入账',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'user_report',
  17. # 显示给用户看的名称
  18. 'lang' => '用户报告',
  19. 'menu' => 'passport',
  20. 'order' => 99,
  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. 'order' => 'desc',
  33. 'list' => true,
  34. ),
  35. 'uid' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '用户名',
  39. 'default' => '',
  40. 'desc' => '用户名',
  41. 'match' => 'is_numeric',
  42. //'update' => 'text',
  43. 'search' => array
  44. (
  45. 'api' => 'passport/user-all',
  46. 'col' => 'username',
  47. 'result' => 'id',
  48. ),
  49. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  50. ),
  51. 'task_id' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '任务名',
  55. 'default' => '-1',
  56. 'desc' => '任务名',
  57. 'match' => 'is_numeric',
  58. //'update' => 'select',
  59. 'search' => array
  60. (
  61. 'api' => 'task/info-all',
  62. 'col' => 'name',
  63. 'result' => 'id',
  64. ),
  65. 'list' => '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
  66. ),
  67. 'username' => array
  68. (
  69. 'type' => 'varchar-100',
  70. 'name' => '账号名',
  71. 'default' => '',
  72. 'desc' => '账号名',
  73. 'match' => 'is_string',
  74. 'update' => 'text',
  75. 'list' => true,
  76. ),
  77. 'pic' => array
  78. (
  79. 'type' => 'text-255',
  80. 'name' => '任务截屏',
  81. 'default' => '',
  82. 'desc' => '任务截屏',
  83. 'match' => 'is_string',
  84. 'update' => 'images',
  85. 'key' => '1',
  86. 'place' => '150',
  87. ),
  88. 'link' => array
  89. (
  90. 'type' => 'varchar-100',
  91. 'name' => '链接',
  92. 'default' => '',
  93. 'desc' => '请输入链接',
  94. 'match' => 'is_string',
  95. 'update' => 'text',
  96. 'list' => true,
  97. ),
  98. 'desc' => array
  99. (
  100. 'type' => 'varchar-800',
  101. 'name' => '文字说明',
  102. 'default' => '',
  103. 'desc' => '文字说明',
  104. 'match' => 'option',
  105. 'update' => 'textarea',
  106. ),
  107. 'status' => array
  108. (
  109. 'type' => 'tinyint-1',
  110. 'name' => '审核状态',
  111. 'default' => '1',
  112. 'desc' => '审核状态',
  113. 'match' => 'is_numeric',
  114. 'update' => 'select',
  115. 'option' => $status,
  116. 'search' => 'select',
  117. 'list' => true,
  118. 'edit' => true,
  119. ),
  120. 'status_desc' => array
  121. (
  122. 'type' => 'varchar-300',
  123. 'name' => '审核说明',
  124. 'default' => '',
  125. 'desc' => '请输入审核说明',
  126. 'match' => 'option',
  127. 'update' => 'textarea',
  128. ),
  129. 'num' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '积分',
  133. 'default' => '',
  134. 'desc' => '积分',
  135. 'match' => 'is_numeric',
  136. 'update' => 'text',
  137. ),
  138. 'num_status' => array
  139. (
  140. 'type' => 'tinyint-1',
  141. 'name' => '是否入账',
  142. 'default' => '1',
  143. 'desc' => '是否入账',
  144. 'match' => 'is_numeric',
  145. 'update' => 'select',
  146. 'option' => $num_status,
  147. 'search' => 'select',
  148. 'list' => true,
  149. ),
  150. 'state' => array
  151. (
  152. 'type' => 'tinyint-1',
  153. 'name' => '状态',
  154. 'default' => '1',
  155. 'desc' => '请选择状态',
  156. 'match' => 'is_numeric',
  157. ),
  158. 'cdate' => array
  159. (
  160. 'type' => 'int-11',
  161. 'name' => '领取时间',
  162. 'match' => array('is_numeric', time()),
  163. 'desc' => '',
  164. # 只有insert时才生效
  165. 'insert' => true,
  166. 'search' => 'date',
  167. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  168. ),
  169. ),
  170. 'manage' => array
  171. (
  172. 'insert' => false,
  173. 'edit' => false,
  174. 'delete' => false,
  175. # 快捷更新
  176. 'list_button' => array
  177. (
  178. 'edit' => array('审核', 'status,status_desc'),
  179. ),
  180. ),
  181. );