user_score_log.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <?php
  2. $status = array
  3. (
  4. 1 => '支出',
  5. 2 => '收入',
  6. );
  7. $cash = array
  8. (
  9. 1 => '微信',
  10. 2 => '支付宝',
  11. );
  12. $type = array
  13. (
  14. 1 => '积分兑现',
  15. 2 => '任务奖励',
  16. 3 => '任务提成',
  17. 4 => '系统奖励',
  18. );
  19. return array
  20. (
  21. # 表名
  22. 'name' => 'user_score_log',
  23. # 显示给用户看的名称
  24. 'lang' => '用户积分日志',
  25. 'menu' => false,
  26. 'order' => 19,
  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. 'num' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '积分',
  61. 'default' => '',
  62. 'desc' => '积分',
  63. 'match' => 'is_numeric',
  64. 'update' => 'text',
  65. ),
  66. 'task_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '任务名',
  70. 'default' => '-1',
  71. 'desc' => '任务名',
  72. 'match' => 'is_numeric',
  73. //'update' => 'select',
  74. 'search' => array
  75. (
  76. 'api' => 'task/info-all',
  77. 'col' => 'name',
  78. 'result' => 'id',
  79. ),
  80. 'list' => '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
  81. ),
  82. 'type' => array
  83. (
  84. 'type' => 'tinyint-1',
  85. 'name' => '积分类型',
  86. 'default' => '1',
  87. 'desc' => '积分类型',
  88. 'match' => 'is_numeric',
  89. 'update' => 'select',
  90. 'option' => $type,
  91. 'search' => 'select',
  92. 'list' => true,
  93. 'edit' => true,
  94. ),
  95. 'cash' => array
  96. (
  97. 'type' => 'tinyint-1',
  98. 'name' => '兑现途径',
  99. 'default' => '1',
  100. 'desc' => '兑现途径',
  101. 'match' => 'is_numeric',
  102. 'update' => 'select',
  103. 'option' => $cash,
  104. 'search' => 'select',
  105. 'list' => true,
  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. 'state' => array
  121. (
  122. 'type' => 'tinyint-1',
  123. 'name' => '状态',
  124. 'default' => '1',
  125. 'desc' => '请选择状态',
  126. 'match' => 'is_numeric',
  127. ),
  128. 'cash_date' => array
  129. (
  130. 'type' => 'int-11',
  131. 'name' => '申请兑现时间',
  132. 'default' => '',
  133. 'match' => 'is_numeric',
  134. 'desc' => '申请兑现时间',
  135. ),
  136. 'cdate' => array
  137. (
  138. 'type' => 'int-11',
  139. 'name' => '录入时间',
  140. 'match' => array('is_numeric', time()),
  141. 'desc' => '',
  142. # 只有insert时才生效
  143. 'insert' => true,
  144. 'search' => 'date',
  145. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  146. ),
  147. ),
  148. 'manage' => array
  149. (
  150. 'insert' => false,
  151. //'edit' => false,
  152. 'delete' => false,
  153. ),
  154. );