user_cash.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php
  2. $type = array
  3. (
  4. 1 => '微信',
  5. 2 => '支付宝',
  6. );
  7. $status = array
  8. (
  9. 1 => '申请中',
  10. 2 => '兑现中',
  11. 3 => '已完成',
  12. 4 => '失败',
  13. );
  14. $cron = array
  15. (
  16. 1 => '待机',
  17. 2 => '完成',
  18. );
  19. return array
  20. (
  21. # 表名
  22. 'name' => 'user_cash',
  23. # 显示给用户看的名称
  24. 'lang' => '用户兑现',
  25. 'menu' => 'passport',
  26. 'order' => 98,
  27. # 数据结构
  28. 'struct' => array
  29. (
  30. 'id' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => 'ID',
  34. 'default' => '',
  35. 'desc' => '',
  36. 'match' => 'is_numeric',
  37. //'search' => 'order',
  38. 'order' => 'desc',
  39. 'list' => true,
  40. ),
  41. 'uid' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '用户名',
  45. 'default' => '',
  46. 'desc' => '用户名',
  47. 'match' => 'is_numeric',
  48. //'update' => 'text',
  49. 'search' => array
  50. (
  51. 'api' => 'passport/user-all',
  52. 'col' => 'username',
  53. 'result' => 'id',
  54. ),
  55. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  56. ),
  57. 'score' => array
  58. (
  59. 'type' => 'varchar-11',
  60. 'name' => '兑现积分',
  61. 'default' => '',
  62. 'desc' => '兑现积分',
  63. 'match' => 'is_numeric',
  64. 'update' => 'text',
  65. 'list_name' => '兑现信息',
  66. 'list' => 'Dever::load("task/lib/manage.cash", {id})',
  67. ),
  68. 'cash' => array
  69. (
  70. 'type' => 'varchar-11',
  71. 'name' => '兑换金额',
  72. 'default' => '',
  73. 'desc' => '兑换金额',
  74. 'match' => 'is_numeric',
  75. 'update' => 'text',
  76. ),
  77. 'type' => array
  78. (
  79. 'type' => 'tinyint-1',
  80. 'name' => '兑现类型',
  81. 'default' => '1',
  82. 'desc' => '兑现类型',
  83. 'match' => 'is_numeric',
  84. 'update' => 'select',
  85. 'option' => $type,
  86. 'search' => 'select',
  87. 'list' => true,
  88. //'edit' => true,
  89. ),
  90. 'status' => array
  91. (
  92. 'type' => 'tinyint-1',
  93. 'name' => '审核状态',
  94. 'default' => '1',
  95. 'desc' => '审核状态',
  96. 'match' => 'is_numeric',
  97. 'update' => 'select',
  98. 'option' => $status,
  99. 'search' => 'select',
  100. 'list' => true,
  101. ),
  102. 'status_desc' => array
  103. (
  104. 'type' => 'varchar-300',
  105. 'name' => '审核说明',
  106. 'default' => '',
  107. 'desc' => '请输入审核说明',
  108. 'match' => 'option',
  109. 'update' => 'textarea',
  110. 'show' => 'status=4',
  111. ),
  112. 'cron' => array
  113. (
  114. 'type' => 'tinyint-1',
  115. 'name' => '计划任务执行状态',
  116. 'default' => '1',
  117. 'desc' => '计划任务执行状态',
  118. 'match' => 'is_numeric',
  119. 'update' => 'select',
  120. 'option' => $cron,
  121. ),
  122. 'state' => array
  123. (
  124. 'type' => 'tinyint-1',
  125. 'name' => '状态',
  126. 'default' => '1',
  127. 'desc' => '请选择状态',
  128. 'match' => 'is_numeric',
  129. ),
  130. 'cdate' => array
  131. (
  132. 'type' => 'int-11',
  133. 'name' => '录入时间',
  134. 'match' => array('is_numeric', time()),
  135. 'desc' => '',
  136. # 只有insert时才生效
  137. 'insert' => true,
  138. 'search' => 'date',
  139. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  140. ),
  141. ),
  142. # 更新表结构
  143. 'alter' => array
  144. (
  145. 1 => array
  146. (
  147. array('update', 'score', 'score', 'varchar-11 0 积分'),
  148. array('update', 'cash', 'cash', 'varchar-11 0 兑换金额'),
  149. ),
  150. 'version' => 1,
  151. ),
  152. 'manage' => array
  153. (
  154. 'insert' => false,
  155. 'edit' => false,
  156. 'delete' => false,
  157. # 快捷更新
  158. 'list_button' => array
  159. (
  160. 'edit' => array('审核', 'status,status_desc', '{status} <= 2'),
  161. ),
  162. ),
  163. );