order_card.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. 'status' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '状态',
  71. 'default' => '1',
  72. 'desc' => '状态',
  73. 'match' => 'is_numeric',
  74. //'update' => 'select',
  75. 'option' => $status,
  76. 'search' => 'select',
  77. 'list' => true,
  78. 'edit' => true,
  79. ),
  80. 'state' => array
  81. (
  82. 'type' => 'tinyint-1',
  83. 'name' => '状态',
  84. 'default' => '1',
  85. 'desc' => '请选择状态',
  86. 'match' => 'is_numeric',
  87. ),
  88. 'cdate' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '创建时间',
  92. 'match' => array('is_numeric', time()),
  93. 'desc' => '',
  94. # 只有insert时才生效
  95. //'insert' => true,
  96. 'search' => 'date',
  97. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  98. ),
  99. ),
  100. 'manage' => array
  101. (
  102. 'insert' => false,
  103. 'delete' => false,
  104. //'page_list' => 'sell_order_goods',
  105. ),
  106. 'request' => array
  107. (
  108. # 获取单条数据
  109. 'getIds' => array
  110. (
  111. # 匹配的正则或函数 选填项
  112. 'option' => array
  113. (
  114. 'uid' => 'yes',
  115. 'shop_id' => 'yes',
  116. 'order_id' => 'yes',
  117. 'status' => 1,
  118. 'state' => 1,
  119. ),
  120. 'type' => 'all',
  121. 'col' => '*|id',
  122. ),
  123. # 获取多条数据
  124. 'getDataByIds' => array
  125. (
  126. # 匹配的正则或函数 选填项
  127. 'option' => array
  128. (
  129. 'ids' => array('yes-id', 'in'),
  130. 'uid' => 'yes',
  131. 'shop_id' => 'yes',
  132. 'order_id' => 'yes',
  133. 'state' => 1,
  134. ),
  135. 'type' => 'all',
  136. 'col' => '*',
  137. ),
  138. # 获取多条数据
  139. 'getTotal' => array
  140. (
  141. # 匹配的正则或函数 选填项
  142. 'option' => array
  143. (
  144. 'order_id' => 'yes',
  145. 'status' => array('yes', 'in'),
  146. 'state' => 1,
  147. ),
  148. 'type' => 'count',
  149. 'col' => '*',
  150. ),
  151. ),
  152. );