order.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <?php
  2. $type = Dever::config('base', 'pay')->pay['type'];
  3. $account = function()
  4. {
  5. return Dever::db('pay/account')->state();
  6. };
  7. $status = Dever::config('base', 'pay')->pay['status'];
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'order',
  12. # 显示给用户看的名称
  13. 'lang' => '订单管理',
  14. 'order' => 1,
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. //'list' => true,
  27. ),
  28. 'uid' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => '用户',
  32. 'default' => '1',
  33. 'desc' => '用户',
  34. 'match' => 'is_numeric',
  35. 'update' => 'text',
  36. /*
  37. 'search' => array
  38. (
  39. 'api' => 'passport/user-all',
  40. 'col' => 'username',
  41. 'result' => 'id',
  42. ),
  43. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  44. */
  45. ),
  46. 'username' => array
  47. (
  48. 'type' => 'varchar-200',
  49. 'name' => '用户名称',
  50. 'default' => '',
  51. 'desc' => '用户名称',
  52. 'match' => 'is_string',
  53. 'update' => 'text',
  54. 'search' => 'fulltext',
  55. 'list' => true,
  56. ),
  57. 'name' => array
  58. (
  59. 'type' => 'varchar-200',
  60. 'name' => '订单名称',
  61. 'default' => '',
  62. 'desc' => '订单名称',
  63. 'match' => 'is_string',
  64. 'update' => 'text',
  65. 'search' => 'fulltext',
  66. 'list' => true,
  67. ),
  68. 'order_id' => array
  69. (
  70. 'type' => 'varchar-100',
  71. 'name' => '订单id',
  72. 'default' => '',
  73. 'desc' => '订单id',
  74. 'match' => 'is_numeric',
  75. 'update' => 'text',
  76. 'list' => true,
  77. ),
  78. 'type' => array
  79. (
  80. 'type' => 'varchar-30',
  81. 'name' => '支付类型',
  82. 'default' => 'wechat',
  83. 'desc' => '支付类型',
  84. 'match' => 'is_string',
  85. 'update' => 'radio',
  86. 'option' => $type,
  87. 'search' => 'select',
  88. 'list' => true,
  89. 'control' => 'type',
  90. ),
  91. 'product_id' => array
  92. (
  93. 'type' => 'varchar-800',
  94. 'name' => '产品id-可能为多个',
  95. 'default' => '',
  96. 'desc' => '产品id',
  97. 'match' => 'is_string',
  98. 'update' => 'text',
  99. ),
  100. 'account_id' => array
  101. (
  102. 'type' => 'int-11',
  103. 'name' => '支付账户',
  104. 'default' => '1',
  105. 'desc' => '支付账户',
  106. 'match' => 'is_numeric',
  107. 'update' => 'select',
  108. 'option' => $account,
  109. 'search' => 'select',
  110. 'list' => true,
  111. ),
  112. 'cash' => array
  113. (
  114. 'type' => 'varchar-11',
  115. 'name' => '金额',
  116. 'default' => '',
  117. 'desc' => '金额',
  118. 'match' => 'is_string',
  119. 'update' => 'text',
  120. 'list' => true,
  121. ),
  122. 'status' => array
  123. (
  124. 'type' => 'tinyint-1',
  125. 'name' => '支付状态',
  126. 'default' => '1',
  127. 'desc' => '支付状态',
  128. 'match' => 'is_numeric',
  129. 'update' => 'radio',
  130. 'option' => $status,
  131. 'search' => 'select',
  132. 'list' => true,
  133. 'control' => 'status',
  134. ),
  135. 'status_desc' => array
  136. (
  137. 'type' => 'varchar-300',
  138. 'name' => '支付状态说明',
  139. 'default' => '',
  140. 'desc' => '请输入支付状态说明',
  141. 'match' => 'option',
  142. 'update' => 'textarea',
  143. 'show' => 'status=3',
  144. ),
  145. 'param' => array
  146. (
  147. 'type' => 'text-255',
  148. 'name' => '支付信息-用于二次支付',
  149. 'default' => '',
  150. 'desc' => '支付信息',
  151. 'match' => 'option',
  152. ),
  153. 'state' => array
  154. (
  155. 'type' => 'tinyint-1',
  156. 'name' => '状态',
  157. 'default' => '1',
  158. 'desc' => '请选择状态',
  159. 'match' => 'is_numeric',
  160. ),
  161. 'cdate' => array
  162. (
  163. 'type' => 'int-11',
  164. 'name' => '申请时间',
  165. 'match' => array('is_numeric', time()),
  166. 'desc' => '',
  167. # 只有insert时才生效
  168. 'insert' => true,
  169. 'search' => 'date',
  170. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  171. ),
  172. ),
  173. 'manage' => array
  174. (
  175. 'insert' => false,
  176. 'edit' => false,
  177. 'delete' => false,
  178. ),
  179. );