card.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. <?php
  2. $type = array
  3. (
  4. 1 => '否',
  5. 2 => '是',
  6. );
  7. $range_type = array
  8. (
  9. 1 => '全部商品可用',
  10. 2 => '指定商品可用',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'card',
  16. # 显示给用户看的名称
  17. 'lang' => '优惠券管理',
  18. 'order' => 100,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. //'list' => true,
  31. ),
  32. 'project_id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '项目ID',
  36. 'default' => '',
  37. 'desc' => '请输入项目',
  38. 'match' => 'is_numeric',
  39. 'list' => true,
  40. ),
  41. 'hr1' => array
  42. (
  43. 'name' => '基本信息',
  44. 'class' => '',//本项必须填写
  45. 'attr' => '',
  46. ),
  47. 'key' => array
  48. (
  49. 'type' => 'varchar-20',
  50. 'name' => '优惠券key-通过key值搜索数据',
  51. 'default' => '',
  52. 'desc' => '优惠券key-通过key值搜索数据',
  53. 'match' => 'is_string',
  54. 'update' => 'text',
  55. 'list' => true,
  56. 'edit' => true,
  57. ),
  58. 'name' => array
  59. (
  60. 'type' => 'varchar-120',
  61. 'name' => '名称',
  62. 'default' => '',
  63. 'desc' => '名称',
  64. 'match' => 'is_string',
  65. 'update' => 'text',
  66. 'list' => true,
  67. ),
  68. 'description' => array
  69. (
  70. 'type' => 'varchar-120',
  71. 'name' => '使用说明',
  72. 'default' => '',
  73. 'desc' => '使用说明',
  74. 'match' => 'is_string',
  75. 'update' => 'textarea',
  76. //'list' => true,
  77. ),
  78. 'create_num' => array
  79. (
  80. 'type' => 'int-11',
  81. 'name' => '生成数量',
  82. 'default' => '',
  83. 'desc' => '生成数量',
  84. 'match' => 'is_numeric',
  85. 'update' => 'text',
  86. 'list' => true,
  87. 'edit' => true,
  88. ),
  89. 'edate' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '优惠券结束时间',
  93. 'match' => 'is_numeric',
  94. 'desc' => '优惠券结束时间',
  95. 'update' => 'date',
  96. //'list' => 'date("Y-m-d H:i:s", {sdate})',
  97. 'callback' => 'maketime',
  98. ),
  99. 'sdate' => array
  100. (
  101. 'type' => 'int-11',
  102. 'name' => '优惠券生效时间',
  103. 'match' => 'is_numeric',
  104. 'desc' => '优惠券生效时间',
  105. 'update' => 'date',
  106. //'list' => 'date("Y-m-d H:i:s", {sdate})',
  107. 'callback' => 'maketime',
  108. ),
  109. 'hr2' => array
  110. (
  111. 'name' => '基本设置',
  112. 'class' => '',//本项必须填写
  113. 'attr' => '',
  114. ),
  115. 'quota' => array
  116. (
  117. 'type' => 'int-11',
  118. 'name' => '每人限领个数',
  119. 'default' => '-1',
  120. 'desc' => '每人限领个数',
  121. 'match' => 'option',
  122. 'update' => 'text',
  123. ),
  124. 'total' => array
  125. (
  126. 'type' => 'int-11',
  127. 'name' => '总库存',
  128. 'default' => '1',
  129. 'desc' => '总库存',
  130. 'match' => 'option',
  131. 'update' => 'text',
  132. ),
  133. 'value' => array
  134. (
  135. 'type' => 'varchar-30',
  136. 'name' => '优惠券面值-如果填写了以下随机面额,则本字段为随机面额最小值',
  137. 'default' => '0.01',
  138. 'desc' => '优惠券面值',
  139. 'match' => 'option',
  140. 'update' => 'text',
  141. ),
  142. 'value_random_to' => array
  143. (
  144. 'type' => 'varchar-20',
  145. 'name' => '优惠券随机面额-随机面额最大值',
  146. 'default' => '',
  147. 'desc' => '优惠券随机面额',
  148. 'match' => 'option',
  149. 'update' => 'text',
  150. ),
  151. 'specify_item_ids' => array
  152. (
  153. 'type' => 'varchar-600',
  154. 'name' => '可选商品ID-需要指定可用商品ID,多个用半角逗号分隔,如不指定则为全部商品可用',
  155. 'default' => '',
  156. 'desc' => '可选商品ID',
  157. 'match' => 'option',
  158. 'update' => 'text',
  159. //'list' => true,
  160. ),
  161. 'at_least' => array
  162. (
  163. 'type' => 'varchar-20',
  164. 'name' => '优惠券使用价格-订单满这个价格,优惠券才可以使用',
  165. 'default' => '',
  166. 'desc' => '订单满这个价格,优惠券才可以使用',
  167. 'match' => 'option',
  168. 'update' => 'text',
  169. //'list' => true,
  170. ),
  171. 'discount' => array
  172. (
  173. 'type' => 'varchar-20',
  174. 'name' => '优惠券使用折扣-如填写88,就是8.8折',
  175. 'default' => '',
  176. 'desc' => '优惠券使用折扣',
  177. 'match' => 'option',
  178. 'update' => 'text',
  179. //'list' => true,
  180. ),
  181. 'expire_notice' => array
  182. (
  183. 'type' => 'tinyint-1',
  184. 'name' => '是否发送提醒-是否到期前4天发送提醒',
  185. 'default' => '1',
  186. 'desc' => '是否发送提醒',
  187. 'match' => 'option',
  188. 'update' => 'select',
  189. 'option' => $type,
  190. ),
  191. 'is_forbid_preference' => array
  192. (
  193. 'type' => 'tinyint-1',
  194. 'name' => '是否仅原价购买商品时可用',
  195. 'default' => '1',
  196. 'desc' => '是否仅原价购买商品时可用',
  197. 'match' => 'option',
  198. 'update' => 'select',
  199. 'option' => $type,
  200. ),
  201. 'is_share' => array
  202. (
  203. 'type' => 'tinyint-1',
  204. 'name' => '是否可分享领取链接',
  205. 'default' => '1',
  206. 'desc' => '是否可分享领取链接',
  207. 'match' => 'option',
  208. 'update' => 'select',
  209. 'option' => $type,
  210. ),
  211. 'mark_tag_ids' => array
  212. (
  213. 'type' => 'varchar-600',
  214. 'name' => '标签设置-领取优惠券要给用户打上的标签的ID,多个用半角逗号分隔',
  215. 'default' => '',
  216. 'desc' => '标签设置',
  217. 'match' => 'option',
  218. 'update' => 'text',
  219. //'list' => true,
  220. ),
  221. 'need_user_level' => array
  222. (
  223. 'type' => 'int-11',
  224. 'name' => '是否限制领用者的等级-小于0表示不限制,大于0 表示领用者必须是这个等级ID',
  225. 'default' => '-1',
  226. 'desc' => '是否限制领用者的等级',
  227. 'match' => 'option',
  228. 'update' => 'text',
  229. ),
  230. 'hr3' => array
  231. (
  232. 'name' => '微信设置',
  233. 'class' => '',//本项必须填写
  234. 'attr' => '',
  235. ),
  236. 'is_sync_weixin' => array
  237. (
  238. 'type' => 'tinyint-1',
  239. 'name' => '是否同步微信卡券',
  240. 'default' => '1',
  241. 'desc' => '是否同步微信卡券',
  242. 'match' => 'option',
  243. 'update' => 'select',
  244. 'option' => $type,
  245. ),
  246. 'weixin_title' => array
  247. (
  248. 'type' => 'varchar-30',
  249. 'name' => '卡券标题',
  250. 'default' => '',
  251. 'desc' => '卡券标题',
  252. 'match' => 'option',
  253. 'update' => 'text',
  254. //'list' => true,
  255. ),
  256. 'weixin_sub_title' => array
  257. (
  258. 'type' => 'varchar-30',
  259. 'name' => '卡券副标题',
  260. 'default' => '',
  261. 'desc' => '卡券副标题',
  262. 'match' => 'option',
  263. 'update' => 'text',
  264. //'list' => true,
  265. ),
  266. 'weixin_color_rgb' => array
  267. (
  268. 'type' => 'varchar-20',
  269. 'name' => '卡券颜色的值-例如:#55bd47',
  270. 'default' => '',
  271. 'desc' => '卡券颜色的值',
  272. 'match' => 'option',
  273. 'update' => 'text',
  274. //'list' => true,
  275. ),
  276. 'service_phone' => array
  277. (
  278. 'type' => 'varchar-20',
  279. 'name' => '卡券的客服电话',
  280. 'default' => '',
  281. 'desc' => '卡券的客服电话',
  282. 'match' => 'option',
  283. 'update' => 'text',
  284. //'list' => true,
  285. ),
  286. 'hr4' => array
  287. (
  288. 'name' => '微信模板消息设置',
  289. 'class' => '',//本项必须填写
  290. 'attr' => '',
  291. ),
  292. 'msg_key' => array
  293. (
  294. 'type' => 'varchar-20',
  295. 'name' => '模板消息key',
  296. 'default' => '',
  297. 'desc' => '模板消息key',
  298. 'match' => 'is_string',
  299. 'update' => 'text',
  300. //'list' => true,
  301. //'edit' => true,
  302. ),
  303. 'msg_page' => array
  304. (
  305. 'type' => 'varchar-200',
  306. 'name' => '页面路径',
  307. 'default' => 'pages/index/index',
  308. 'desc' => '页面路径',
  309. 'match' => 'is_string',
  310. 'update' => 'text',
  311. //'list' => true,
  312. ),
  313. 'msg_content' => array
  314. (
  315. 'type' => 'text-255',
  316. 'name' => '模板内容',
  317. 'default' => '',
  318. 'desc' => '请输入内容',
  319. 'match' => 'is_string',
  320. 'update' => array
  321. (
  322. array
  323. (
  324. 'col' => 'key',
  325. 'name' => '标识',
  326. 'default' => '',
  327. 'desc' => '请输入标识',
  328. 'match' => 'is_string',
  329. 'update' => 'text',
  330. ),
  331. array
  332. (
  333. 'col' => 'value',
  334. 'name' => '内容值',
  335. 'default' => '',
  336. 'desc' => '内容值',
  337. 'match' => 'is_string',
  338. 'update' => 'textarea',
  339. ),
  340. ),
  341. ),
  342. 'state' => array
  343. (
  344. 'type' => 'tinyint-1',
  345. 'name' => '状态',
  346. 'default' => '1',
  347. 'desc' => '请选择状态',
  348. 'match' => 'is_numeric',
  349. ),
  350. 'cdate' => array
  351. (
  352. 'type' => 'int-11',
  353. 'name' => '更新时间',
  354. 'match' => array('is_numeric', time()),
  355. 'desc' => '',
  356. 'default' => '',
  357. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  358. ),
  359. ),
  360. 'top' => Dever::config('base', 'youzan')->top,
  361. 'manage' => array
  362. (
  363. //'delete' => false,
  364. //'insert' => false,
  365. //'edit' => false,
  366. 'list_button' => array
  367. (
  368. 'oper' => array('立刻生成', '"youzan/card.create?id={id}"'),
  369. ),
  370. ),
  371. );