profit_log.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <?php
  2. $status = array
  3. (
  4. 1 => '未结算',
  5. 2 => '已结算',
  6. 3 => '部分结算',
  7. 4 => '结算失败',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'profit_log',
  13. # 显示给用户看的名称
  14. 'lang' => '用户收益流水',
  15. 'menu' => false,
  16. 'status' => $status,
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. 'search' => 'order',
  28. //'list' => true,
  29. ),
  30. 'order_num' => array
  31. (
  32. 'type' => 'varchar-100',
  33. 'name' => '流水号',
  34. 'default' => '',
  35. 'desc' => '流水号',
  36. 'match' => 'is_string',
  37. 'search' => 'fulltext',
  38. 'list' => true,
  39. ),
  40. 'name' => array
  41. (
  42. 'type' => 'varchar-200',
  43. 'name' => '标题',
  44. 'default' => '',
  45. 'desc' => '标题',
  46. 'match' => 'is_string',
  47. 'update' => 'text',
  48. 'search' => 'fulltext',
  49. 'list' => true,
  50. ),
  51. 'profit_id' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '收益账户id',
  55. 'default' => '',
  56. 'desc' => '收益账户id',
  57. 'match' => 'is_numeric',
  58. 'search' => 'hidden',
  59. ),
  60. 'uid' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '用户ID',
  64. 'default' => '0',
  65. 'desc' => '用户名称',
  66. 'match' => 'is_numeric',
  67. 'search' => 'hidden',
  68. 'list_name' => '用户名称',
  69. 'list' => 'Dever::load("account/lib/project.getUsername", {uid}, {config_id})',
  70. ),
  71. 'source' => array
  72. (
  73. 'type' => 'varchar-150',
  74. 'name' => '来源表名',
  75. 'default' => '',
  76. 'desc' => '来源表名',
  77. 'match' => 'is_numeric',
  78. ),
  79. 'source_id' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '来源表id',
  83. 'default' => '',
  84. 'desc' => '来源表id',
  85. 'match' => 'is_string',
  86. 'update' => 'text',
  87. ),
  88. 'cash' => array
  89. (
  90. 'type' => 'decimal-11,2',
  91. 'name' => '总金额',
  92. 'default' => '0',
  93. 'desc' => '总金额',
  94. 'match' => 'is_numeric',
  95. 'update' => 'text',
  96. 'list' => true,
  97. ),
  98. 'ycash' => array
  99. (
  100. 'type' => 'decimal-11,2',
  101. 'name' => '已结算金额',
  102. 'default' => '0',
  103. 'desc' => '已结算金额',
  104. 'match' => 'is_numeric',
  105. 'update' => 'text',
  106. 'list' => true,
  107. ),
  108. 'tcash' => array
  109. (
  110. 'type' => 'decimal-11,2',
  111. 'name' => '已结算退还金额',
  112. 'default' => '0',
  113. 'desc' => '已结算退还金额',
  114. 'match' => 'is_numeric',
  115. 'update' => 'text',
  116. 'list' => true,
  117. ),
  118. 'desc' => array
  119. (
  120. 'type' => 'varchar-600',
  121. 'name' => '收益说明',
  122. 'default' => '',
  123. 'desc' => '收益说明',
  124. 'match' => 'is_string',
  125. 'update' => 'text',
  126. 'search' => 'fulltext',
  127. 'list' => true,
  128. ),
  129. 'status' => array
  130. (
  131. 'type' => 'tinyint-1',
  132. 'name' => '状态',
  133. 'default' => '1',
  134. 'desc' => '状态',
  135. 'match' => 'is_numeric',
  136. 'option' => $status,
  137. 'list' => true,
  138. ),
  139. 'fdate' => array
  140. (
  141. 'type' => 'int-11',
  142. 'name' => '结算时间',
  143. 'default' => '',
  144. 'match' => 'is_numeric',
  145. 'desc' => '',
  146. ),
  147. 'state' => array
  148. (
  149. 'type' => 'tinyint-1',
  150. 'name' => '状态',
  151. 'default' => '1',
  152. 'desc' => '请选择状态',
  153. 'match' => 'is_numeric',
  154. ),
  155. 'cdate' => array
  156. (
  157. 'type' => 'int-11',
  158. 'name' => '交易时间',
  159. 'match' => array('is_numeric', time()),
  160. 'desc' => '',
  161. # 只有insert时才生效
  162. 'insert' => true,
  163. 'search' => 'date',
  164. 'list_name' => '交易时间',
  165. 'list' => 'time',
  166. ),
  167. ),
  168. # 索引
  169. 'index' => array
  170. (
  171. 1 => array
  172. (
  173. 'search_1' => 'profit_id,source,source_id',
  174. 'search_2' => 'profit_id,uid',
  175. ),
  176. # 版本号 更改版本号会更新当前表的索引
  177. 'version' => 1,
  178. ),
  179. 'manage' => array
  180. (
  181. 'insert' => false,
  182. 'delete' => false,
  183. 'edit' => false,
  184. 'excel' => true,
  185. ),
  186. 'request' => array
  187. (
  188. 'getData' => array
  189. (
  190. 'type' => 'all',
  191. 'option' => array
  192. (
  193. 'config_id' => 'yes',
  194. 'profit_id' => 'yes',
  195. 'uid' => 'yes',
  196. 'start' => array('yes-cdate', '>='),
  197. 'end' => array('yes-cdate', '<='),
  198. 'state' => 1,
  199. ),
  200. 'order' => array('id' => 'desc'),
  201. 'page' => array(10, 'list'),
  202. 'col' => '*',
  203. ),
  204. ),
  205. );