user_cash.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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' => 'int-11',
  60. 'name' => '兑现积分',
  61. 'default' => '',
  62. 'desc' => '兑现积分',
  63. 'match' => 'is_numeric',
  64. 'update' => 'text',
  65. 'list' => 'table',
  66. 'list_name' => '兑现信息',
  67. 'modal' => '查看详情',
  68. ),
  69. 'cash' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '兑换金额',
  73. 'default' => '',
  74. 'desc' => '兑换金额',
  75. 'match' => 'is_numeric',
  76. 'update' => 'text',
  77. ),
  78. 'type' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '兑现类型',
  82. 'default' => '1',
  83. 'desc' => '兑现类型',
  84. 'match' => 'is_numeric',
  85. 'update' => 'select',
  86. 'option' => $type,
  87. 'search' => 'select',
  88. 'list' => true,
  89. //'edit' => true,
  90. ),
  91. 'status' => array
  92. (
  93. 'type' => 'tinyint-1',
  94. 'name' => '审核状态',
  95. 'default' => '1',
  96. 'desc' => '审核状态',
  97. 'match' => 'is_numeric',
  98. 'update' => 'select',
  99. 'option' => $status,
  100. 'search' => 'select',
  101. 'list' => true,
  102. ),
  103. 'status_desc' => array
  104. (
  105. 'type' => 'varchar-300',
  106. 'name' => '审核说明',
  107. 'default' => '',
  108. 'desc' => '请输入审核说明',
  109. 'match' => 'option',
  110. 'update' => 'textarea',
  111. 'show' => 'status=4',
  112. ),
  113. 'cron' => array
  114. (
  115. 'type' => 'tinyint-1',
  116. 'name' => '计划任务状态',
  117. 'default' => '1',
  118. 'desc' => '计划任务状态',
  119. 'match' => 'is_numeric',
  120. 'update' => 'select',
  121. 'option' => $cron,
  122. ),
  123. 'state' => array
  124. (
  125. 'type' => 'tinyint-1',
  126. 'name' => '状态',
  127. 'default' => '1',
  128. 'desc' => '请选择状态',
  129. 'match' => 'is_numeric',
  130. ),
  131. 'cdate' => array
  132. (
  133. 'type' => 'int-11',
  134. 'name' => '录入时间',
  135. 'match' => array('is_numeric', time()),
  136. 'desc' => '',
  137. # 只有insert时才生效
  138. 'insert' => true,
  139. 'search' => 'date',
  140. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  141. ),
  142. ),
  143. 'manage' => array
  144. (
  145. 'insert' => false,
  146. 'edit' => false,
  147. 'delete' => false,
  148. # 快捷更新
  149. 'list_button' => array
  150. (
  151. 'edit' => array('审核', 'status,status_desc'),
  152. ),
  153. ),
  154. );