code.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待核销',
  5. 2 => '已核销',
  6. 3 => '已作废',
  7. );
  8. $act_status = array
  9. (
  10. 1 => '未开始',
  11. 2 => '报名中',
  12. 3 => '报名结束',
  13. 4 => '活动开始',
  14. 5 => '活动结束',
  15. );
  16. return array
  17. (
  18. # 表名
  19. 'name' => 'code',
  20. # 显示给用户看的名称
  21. 'lang' => '活动核销码',
  22. # 后台菜单排序
  23. 'order' => 2,
  24. // 'menu' => false,
  25. # 数据结构
  26. 'struct' => array
  27. (
  28. 'id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => 'ID',
  32. 'default' => '',
  33. 'desc' => '',
  34. 'match' => 'is_numeric',
  35. 'search' => 'order',
  36. 'list' => true,
  37. 'order' => 'desc',
  38. ),
  39. 'active_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '活动名称',
  43. 'default' => '-1',
  44. 'desc' => '活动名称',
  45. 'match' => 'is_string',
  46. 'update' => 'hidden',
  47. 'search' => array
  48. (
  49. 'api' => 'active/info-getSearch',
  50. 'col' => 'col',
  51. 'result' => 'id',
  52. 'search' => 'active_id',
  53. ),
  54. 'list' => "Dever::load('active/lib/manage.active#active_name',{active_id})",
  55. ),
  56. 'order_id' => array
  57. (
  58. 'type' => 'int-11',
  59. 'name' => '订单名称',
  60. 'default' => '-1',
  61. 'desc' => '订单名称',
  62. 'match' => 'is_string',
  63. 'update' => 'hidden',
  64. // 'search' => 'text',
  65. // 'list' => true,
  66. ),
  67. 'join_uid' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '参加人名称/手机号',
  71. 'default' => '-1',
  72. 'desc' => '用户名称',
  73. 'match' => 'is_string',
  74. // 'option' => $user,
  75. // 'update' => 'text',
  76. 'search' => array
  77. (
  78. 'api' => 'active/user-getSearch',
  79. 'col' => 'col',
  80. 'result' => 'id',
  81. 'search' => 'mid',
  82. ),
  83. 'list_name' => '参加人信息',
  84. 'list' => "Dever::load('active/lib/manage.user',{join_uid})",
  85. ),
  86. 'buy_uid' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '购买人姓名/手机号',
  90. 'default' => '-1',
  91. 'desc' => '用户名称',
  92. 'match' => 'is_string',
  93. // 'option' => $user,
  94. // 'update' => 'text',
  95. 'search' => array
  96. (
  97. 'api' => 'active/user-getSearch',
  98. 'col' => 'col',
  99. 'result' => 'id',
  100. 'search' => 'mid',
  101. ),
  102. 'list_name' => '购买人信息',
  103. 'list' => "Dever::load('active/lib/manage.user',{buy_uid})",
  104. ),
  105. 'write_code' => array
  106. (
  107. 'type' => 'varchar-200',
  108. 'name' => '核销码',
  109. 'default' => '',
  110. 'desc' => '核销码',
  111. 'match' => 'is_string',
  112. 'update' => 'text',
  113. 'search' => 'fulltext',
  114. 'list' => true,
  115. ),
  116. 'act_status' => array
  117. (
  118. 'type' => 'tinyint-1',
  119. 'name' => '活动状态',
  120. 'default' => '1',
  121. 'desc' => '活动状态',
  122. 'match' => 'is_numeric',
  123. // 'update' => 'radio',
  124. 'option' => $act_status,
  125. 'search' => 'select',
  126. 'list' => true,
  127. ),
  128. 'status' => array
  129. (
  130. 'type' => 'tinyint-1',
  131. 'name' => '核销状态',
  132. 'default' => '1',
  133. 'desc' => '核销状态',
  134. 'match' => 'is_numeric',
  135. 'option' => $status,
  136. 'search' => 'select',
  137. 'list' => true,
  138. ),
  139. 'pic' => array
  140. (
  141. 'type' => 'text-255',
  142. 'name' => '二维码',
  143. 'default' => '',
  144. 'desc' => '二维码',
  145. 'match' => 'option',
  146. 'update' => 'image',
  147. 'key' => '1',
  148. // 'place' => '759*562',
  149. ),
  150. 'offdate' => array
  151. (
  152. 'type' => 'int-11',
  153. 'name' => '核销时间',
  154. 'default' => '',
  155. 'match' => 'is_numeric',
  156. // 'search' => 'date',
  157. // 'desc' => '',
  158. // 'list' => 'date("Y-m-d H:i:s", {zdate})',
  159. ),
  160. 'audit_admin' => array
  161. (
  162. 'type' => 'int-11',
  163. 'name' => '核销操作人',
  164. 'default' => '',
  165. 'match' => 'is_numeric',
  166. 'desc' => '核销操作人',
  167. 'list' => 'Dever::load("active/lib/manage.active#admin_name",{id})',
  168. // '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  169. // 'list_order' => 8,
  170. ),
  171. 'top_admin' => array
  172. (
  173. 'type' => 'int-11',
  174. 'name' => '前台核销操作人',
  175. 'default' => '',
  176. 'match' => 'is_numeric',
  177. 'desc' => '核销操作人',
  178. // 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  179. // 'list_order' => 8,
  180. ),
  181. 'state' => array
  182. (
  183. 'type' => 'tinyint-1',
  184. 'name' => '状态',
  185. 'default' => '1',
  186. 'desc' => '请选择状态',
  187. 'match' => 'is_numeric',
  188. ),
  189. 'cdate' => array
  190. (
  191. 'type' => 'int-11',
  192. 'name' => '领取日期',
  193. 'match' => array('is_numeric', time()),
  194. 'desc' => '',
  195. # 只有insert时才生效
  196. 'insert' => true,
  197. 'search' => 'day',
  198. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  199. 'list_order' => 5,
  200. ),
  201. ),
  202. 'manage' => array
  203. (
  204. 'insert' => false,
  205. 'delete' => false,
  206. 'edit' => false,
  207. ),
  208. 'request' => array
  209. (
  210. 'getAll' => array
  211. (
  212. # 匹配的正则或函数 选填项
  213. 'option' => array
  214. (
  215. 'join_uid' => 'yes',
  216. 'state' => 1,
  217. ),
  218. 'type' => 'all',
  219. 'order' => array('cdate' => 'desc'),
  220. 'col' => '*',
  221. ),
  222. 'getCode' => array
  223. (
  224. # 匹配的正则或函数 选填项
  225. 'option' => array
  226. (
  227. 'order_id' => 'yes',
  228. 'status' => array('yes','in'),
  229. 'state' => 1,
  230. ),
  231. 'type' => 'all',
  232. 'order' => array('cdate' => 'desc'),
  233. 'col' => '*',
  234. ),
  235. ),
  236. );