user_score_log.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <?php
  2. $status = array
  3. (
  4. 1 => '支出',
  5. 2 => '收入',
  6. );
  7. $cash_type = array
  8. (
  9. 1 => '微信',
  10. 2 => '支付宝',
  11. );
  12. $type = array
  13. (
  14. 1 => '积分兑现-申请',
  15. 2 => '积分兑现-完成',
  16. 3 => '积分兑现-失败',
  17. 4 => '任务奖励',
  18. 5 => '任务提成',
  19. 6 => '系统奖励',
  20. );
  21. return array
  22. (
  23. # 表名
  24. 'name' => 'user_score_log',
  25. # 显示给用户看的名称
  26. 'lang' => '用户积分日志',
  27. 'menu' => false,
  28. 'order' => 19,
  29. # 数据结构
  30. 'struct' => array
  31. (
  32. 'id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => 'ID',
  36. 'default' => '',
  37. 'desc' => '',
  38. 'match' => 'is_numeric',
  39. //'search' => 'order',
  40. 'order' => 'desc',
  41. 'list' => true,
  42. ),
  43. 'uid' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '用户名',
  47. 'default' => '',
  48. 'desc' => '用户名',
  49. 'match' => 'is_numeric',
  50. //'update' => 'text',
  51. 'search' => array
  52. (
  53. 'api' => 'passport/user-all',
  54. 'col' => 'username',
  55. 'result' => 'id',
  56. ),
  57. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  58. ),
  59. 'group_uid' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '下限用户名',
  63. 'default' => '',
  64. 'desc' => '下限用户名',
  65. 'match' => 'is_numeric',
  66. //'update' => 'text',
  67. 'search' => array
  68. (
  69. 'api' => 'passport/user-all',
  70. 'col' => 'username',
  71. 'result' => 'id',
  72. ),
  73. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  74. ),
  75. 'score' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '积分',
  79. 'default' => '',
  80. 'desc' => '积分',
  81. 'match' => 'is_numeric',
  82. 'update' => 'text',
  83. ),
  84. 'cash' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '兑换现金',
  88. 'default' => '',
  89. 'desc' => '兑换现金',
  90. 'match' => 'is_numeric',
  91. 'update' => 'text',
  92. ),
  93. 'task_id' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '任务名',
  97. 'default' => '-1',
  98. 'desc' => '任务名',
  99. 'match' => 'is_numeric',
  100. //'update' => 'select',
  101. 'search' => array
  102. (
  103. 'api' => 'task/info-all',
  104. 'col' => 'name',
  105. 'result' => 'id',
  106. ),
  107. 'list' => '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
  108. ),
  109. 'report_id' => array
  110. (
  111. 'type' => 'int-11',
  112. 'name' => '报告',
  113. 'default' => '-1',
  114. 'desc' => '报告',
  115. 'match' => 'is_numeric',
  116. ),
  117. 'type' => array
  118. (
  119. 'type' => 'tinyint-1',
  120. 'name' => '积分类型',
  121. 'default' => '1',
  122. 'desc' => '积分类型',
  123. 'match' => 'is_numeric',
  124. 'update' => 'select',
  125. 'option' => $type,
  126. 'search' => 'select',
  127. 'list' => true,
  128. 'edit' => true,
  129. ),
  130. 'type_desc' => array
  131. (
  132. 'type' => 'varchar-300',
  133. 'name' => '积分类型描述',
  134. 'default' => '',
  135. 'desc' => '请输入积分类型描述',
  136. 'match' => 'option',
  137. 'update' => 'textarea',
  138. ),
  139. 'cash_type' => array
  140. (
  141. 'type' => 'tinyint-1',
  142. 'name' => '兑现途径',
  143. 'default' => '1',
  144. 'desc' => '兑现途径',
  145. 'match' => 'is_numeric',
  146. 'update' => 'select',
  147. 'option' => $cash_type,
  148. 'search' => 'select',
  149. 'list' => true,
  150. ),
  151. 'status' => array
  152. (
  153. 'type' => 'tinyint-1',
  154. 'name' => '收入支出状态',
  155. 'default' => '1',
  156. 'desc' => '收入支出状态',
  157. 'match' => 'is_numeric',
  158. 'update' => 'select',
  159. 'option' => $status,
  160. 'search' => 'select',
  161. 'list' => true,
  162. 'edit' => true,
  163. ),
  164. 'state' => array
  165. (
  166. 'type' => 'tinyint-1',
  167. 'name' => '状态',
  168. 'default' => '1',
  169. 'desc' => '请选择状态',
  170. 'match' => 'is_numeric',
  171. ),
  172. 'cash_date' => array
  173. (
  174. 'type' => 'int-11',
  175. 'name' => '申请兑现时间',
  176. 'default' => '',
  177. 'match' => 'is_numeric',
  178. 'desc' => '申请兑现时间',
  179. ),
  180. 'cdate' => array
  181. (
  182. 'type' => 'int-11',
  183. 'name' => '录入时间',
  184. 'match' => array('is_numeric', time()),
  185. 'desc' => '',
  186. # 只有insert时才生效
  187. 'insert' => true,
  188. 'search' => 'date',
  189. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  190. ),
  191. ),
  192. 'manage' => array
  193. (
  194. 'insert' => false,
  195. //'edit' => false,
  196. 'delete' => false,
  197. ),
  198. 'request' => array
  199. (
  200. 'getAll' => array
  201. (
  202. # 匹配的正则或函数 选填项
  203. 'option' => array
  204. (
  205. 'uid' => 'yes',
  206. 'task_id' => 'yes',
  207. 'report_id' => 'yes',
  208. 'status' => 'yes',
  209. 'type' => 'yes',
  210. 'state' => 1,
  211. ),
  212. 'type' => 'all',
  213. 'order' => array('cdate' => 'desc'),
  214. 'col' => '*',
  215. ),
  216. )
  217. );