code.php 6.8 KB

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