create_code.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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' => 'creat_code',
  20. # 显示给用户看的名称
  21. 'lang' => '生成核销码',
  22. 'menu' => false,
  23. # 后台菜单排序
  24. 'order' => 2,
  25. 'start' => array
  26. (
  27. 'insert' => 'active/lib/order.insertCode',
  28. ),
  29. 'end' => array
  30. (
  31. 'update' => 'active/lib/order.createCode',
  32. 'insert' => 'active/lib/order.createCode',
  33. ),
  34. // 'menu' => false,
  35. # 数据结构
  36. 'struct' => array
  37. (
  38. 'id' => array
  39. (
  40. 'type' => 'int-11',
  41. 'name' => 'ID',
  42. 'default' => '',
  43. 'desc' => '',
  44. 'match' => 'is_numeric',
  45. 'search' => 'order',
  46. 'list' => true,
  47. 'order' => 'desc',
  48. ),
  49. 'active_id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '活动名称',
  53. 'default' => '-1',
  54. 'desc' => '活动名称',
  55. 'match' => 'is_string',
  56. 'update' => 'hidden',
  57. 'value' => Dever::input('search_option_active_id'),
  58. 'search' => array
  59. (
  60. 'api' => 'active/info-getSearch',
  61. 'col' => 'col',
  62. 'result' => 'id',
  63. 'search' => 'active_id',
  64. ),
  65. 'list' => "Dever::load('active/lib/manage.active#active_name',{active_id})",
  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. 'write_code' => array
  87. (
  88. 'type' => 'varchar-200',
  89. 'name' => '核销码',
  90. 'default' => '',
  91. 'desc' => '核销码',
  92. 'match' => 'is_string',
  93. // 'update' => 'text',
  94. 'search' => 'fulltext',
  95. 'list' => true,
  96. ),
  97. 'pic' => array
  98. (
  99. 'type' => 'text-255',
  100. 'name' => '二维码',
  101. 'default' => '',
  102. 'desc' => '二维码',
  103. 'match' => 'option',
  104. // 'update' => 'image',
  105. 'key' => '1',
  106. // 'place' => '759*562',
  107. ),
  108. 'content' => array
  109. (
  110. 'type' => 'text-255',
  111. 'name' => '填写手机号-多个换行隔开,如手机号重复将不会录入到库中',
  112. 'default' => '',
  113. 'desc' => '填写手机号',
  114. 'match' => 'is_string',
  115. 'update' => 'textarea',
  116. 'value' => '',
  117. // 'show' => 'type=2',
  118. ),
  119. 'state' => array
  120. (
  121. 'type' => 'tinyint-1',
  122. 'name' => '状态',
  123. 'default' => '1',
  124. 'desc' => '请选择状态',
  125. 'match' => 'is_numeric',
  126. ),
  127. 'cdate' => array
  128. (
  129. 'type' => 'int-11',
  130. 'name' => '领取日期',
  131. 'match' => array('is_numeric', time()),
  132. 'desc' => '',
  133. # 只有insert时才生效
  134. 'insert' => true,
  135. 'search' => 'day',
  136. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  137. 'list_order' => 5,
  138. ),
  139. ),
  140. 'manage' => array
  141. (
  142. 'insert' => false,
  143. 'delete' => false,
  144. 'edit' => false,
  145. ),
  146. 'request' => array
  147. (
  148. 'getOne' => array
  149. (
  150. # 匹配的正则或函数 选填项
  151. 'option' => array
  152. (
  153. 'join_uid' => 'yes',
  154. 'active_id' =>'yes',
  155. 'status' => array('yes','in'),
  156. 'state' => 1,
  157. ),
  158. 'type' => 'one',
  159. // 'order' => array('cdate' => 'desc'),
  160. 'col' => '*',
  161. ),
  162. 'getAll' => array
  163. (
  164. # 匹配的正则或函数 选填项
  165. 'option' => array
  166. (
  167. 'join_uid' => array('yes','>='),
  168. // 'active_id' =>'yes',
  169. // 'status' => array('yes','in'),
  170. 'state' => 1,
  171. ),
  172. 'type' => 'all',
  173. 'order' => array('cdate' => 'desc'),
  174. 'col' => '*',
  175. ),
  176. ),
  177. );