order_card.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <?php
  2. $status = array
  3. (
  4. 1 => '正常',
  5. 2 => '申请退款中',
  6. 3 => '已取消',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'order_card',
  12. # 显示给用户看的名称
  13. 'lang' => '礼品卡子订单',
  14. 'menu' => false,
  15. 'status' => $status,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'search' => 'order',
  27. 'update' => 'hidden',
  28. //'list' => true,
  29. ),
  30. 'order_id' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => '订单表id',
  34. 'default' => '',
  35. 'desc' => '订单表id',
  36. 'match' => 'is_numeric',
  37. ),
  38. 'card_id' => array
  39. (
  40. 'type' => 'int-11',
  41. 'name' => '礼品卡名称',
  42. 'default' => '',
  43. 'desc' => '礼品卡名称',
  44. 'match' => 'is_numeric',
  45. 'list' => 'Dever::load("card/info-find#name", {card_id})',
  46. ),
  47. 'price' => array
  48. (
  49. 'type' => 'varchar-50',
  50. 'name' => '单价',
  51. 'default' => '',
  52. 'desc' => '单价',
  53. 'match' => 'option',
  54. 'update' => 'text',
  55. 'list' => true,
  56. ),
  57. 'num' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '购买数量',
  61. 'default' => '',
  62. 'desc' => '购买数量',
  63. 'match' => 'is_numeric',
  64. 'search' => 'select',
  65. 'list' => true,
  66. ),
  67. 'cards' => array
  68. (
  69. 'type' => 'varchar-2000',
  70. 'name' => '卡号',
  71. 'default' => '',
  72. 'desc' => '卡号',
  73. 'match' => 'option',
  74. 'list' => true,
  75. ),
  76. 'status' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '状态',
  80. 'default' => '1',
  81. 'desc' => '状态',
  82. 'match' => 'is_numeric',
  83. //'update' => 'select',
  84. 'option' => $status,
  85. 'search' => 'select',
  86. 'list' => true,
  87. 'edit' => true,
  88. ),
  89. 'state' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '状态',
  93. 'default' => '1',
  94. 'desc' => '请选择状态',
  95. 'match' => 'is_numeric',
  96. ),
  97. 'cdate' => array
  98. (
  99. 'type' => 'int-11',
  100. 'name' => '创建时间',
  101. 'match' => array('is_numeric', time()),
  102. 'desc' => '',
  103. # 只有insert时才生效
  104. //'insert' => true,
  105. 'search' => 'date',
  106. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  107. ),
  108. ),
  109. 'manage' => array
  110. (
  111. 'insert' => false,
  112. 'delete' => false,
  113. //'page_list' => 'sell_order_goods',
  114. ),
  115. 'request' => array
  116. (
  117. # 获取单条数据
  118. 'getIds' => array
  119. (
  120. # 匹配的正则或函数 选填项
  121. 'option' => array
  122. (
  123. 'uid' => 'yes',
  124. 'card_id' => 'yes',
  125. 'order_id' => 'yes',
  126. 'status' => 1,
  127. 'state' => 1,
  128. ),
  129. 'type' => 'all',
  130. 'col' => '*|id',
  131. ),
  132. # 获取多条数据
  133. 'getDataByIds' => array
  134. (
  135. # 匹配的正则或函数 选填项
  136. 'option' => array
  137. (
  138. 'ids' => array('yes-id', 'in'),
  139. 'uid' => 'yes',
  140. 'card_id' => 'yes',
  141. 'order_id' => 'yes',
  142. 'state' => 1,
  143. ),
  144. 'type' => 'all',
  145. 'col' => '*',
  146. ),
  147. # 获取多条数据
  148. 'getTotal' => array
  149. (
  150. # 匹配的正则或函数 选填项
  151. 'option' => array
  152. (
  153. 'uid' => 'yes',
  154. 'order_id' => 'yes',
  155. 'status' => array('yes', 'in'),
  156. 'state' => 1,
  157. ),
  158. 'type' => 'count',
  159. 'col' => '*',
  160. ),
  161. ),
  162. );