profit_log.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. 'desc' => array
  109. (
  110. 'type' => 'varchar-600',
  111. 'name' => '收益说明',
  112. 'default' => '',
  113. 'desc' => '收益说明',
  114. 'match' => 'is_string',
  115. 'update' => 'text',
  116. 'search' => 'fulltext',
  117. 'list' => true,
  118. ),
  119. 'status' => array
  120. (
  121. 'type' => 'tinyint-1',
  122. 'name' => '状态',
  123. 'default' => '1',
  124. 'desc' => '状态',
  125. 'match' => 'is_numeric',
  126. 'option' => $status,
  127. 'list' => true,
  128. ),
  129. 'fdate' => array
  130. (
  131. 'type' => 'int-11',
  132. 'name' => '结算时间',
  133. 'default' => '',
  134. 'match' => 'is_numeric',
  135. 'desc' => '',
  136. ),
  137. 'state' => array
  138. (
  139. 'type' => 'tinyint-1',
  140. 'name' => '状态',
  141. 'default' => '1',
  142. 'desc' => '请选择状态',
  143. 'match' => 'is_numeric',
  144. ),
  145. 'cdate' => array
  146. (
  147. 'type' => 'int-11',
  148. 'name' => '交易时间',
  149. 'match' => array('is_numeric', time()),
  150. 'desc' => '',
  151. # 只有insert时才生效
  152. 'insert' => true,
  153. 'search' => 'date',
  154. 'list_name' => '交易时间',
  155. 'list' => 'time',
  156. ),
  157. ),
  158. # 索引
  159. 'index' => array
  160. (
  161. 1 => array
  162. (
  163. 'search_1' => 'profit_id,source,source_id',
  164. 'search_2' => 'profit_id,uid',
  165. ),
  166. # 版本号 更改版本号会更新当前表的索引
  167. 'version' => 1,
  168. ),
  169. 'manage' => array
  170. (
  171. 'insert' => false,
  172. 'delete' => false,
  173. 'edit' => false,
  174. 'excel' => true,
  175. ),
  176. 'request' => array
  177. (
  178. 'getData' => array
  179. (
  180. 'type' => 'all',
  181. 'option' => array
  182. (
  183. 'config_id' => 'yes',
  184. 'profit_id' => 'yes',
  185. 'uid' => 'yes',
  186. 'start' => array('yes-cdate', '>='),
  187. 'end' => array('yes-cdate', '<='),
  188. 'state' => 1,
  189. ),
  190. 'page' => array(10, 'list'),
  191. 'col' => '*',
  192. ),
  193. ),
  194. );