card_list.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. $type = array
  3. (
  4. 1 => '未使用',
  5. 2 => '已使用',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'card_list',
  11. # 显示给用户看的名称
  12. 'lang' => '单个优惠券列表',
  13. 'order' => 90,
  14. # 数据结构
  15. 'struct' => array
  16. (
  17. 'id' => array
  18. (
  19. 'type' => 'int-11',
  20. 'name' => 'ID',
  21. 'default' => '',
  22. 'desc' => '',
  23. 'match' => 'is_numeric',
  24. 'search' => 'order',
  25. 'list' => true,
  26. ),
  27. 'project_id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => '项目',
  31. 'default' => '',
  32. 'desc' => '请输入项目',
  33. 'match' => 'is_numeric',
  34. ),
  35. 'card_id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '优惠券id',
  39. 'default' => '',
  40. 'desc' => '优惠券id',
  41. 'match' => 'is_numeric',
  42. 'update' => 'text',
  43. 'list' => 'Dever::load("youzan/card-one#name", {card_id})',
  44. ),
  45. 'user' => array
  46. (
  47. 'type' => 'varchar-120',
  48. 'name' => '使用者',
  49. 'default' => '',
  50. 'desc' => '使用者',
  51. 'match' => 'is_string',
  52. 'update' => 'text',
  53. 'search' => 'fulltext',
  54. 'list' => true,
  55. ),
  56. 'group_id' => array
  57. (
  58. 'type' => 'varchar-20',
  59. 'name' => '优惠券组id',
  60. 'default' => '',
  61. 'desc' => '优惠券组id',
  62. 'match' => 'option',
  63. //'search' => 'order',
  64. 'list' => true,
  65. ),
  66. 'code_url' => array
  67. (
  68. 'type' => 'varchar-200',
  69. 'name' => '优惠券地址',
  70. 'default' => '',
  71. 'desc' => '优惠券地址',
  72. 'match' => 'option',
  73. 'search' => 'fulltext',
  74. //'search' => 'order',
  75. 'list' => true,
  76. 'modal' => '查看详情',
  77. ),
  78. 'result' => array
  79. (
  80. 'type' => 'text-255',
  81. 'name' => '有赞返回信息',
  82. 'default' => '',
  83. 'desc' => '有赞返回信息',
  84. 'match' => 'option',
  85. 'update' => 'textarea',
  86. 'list' => true,
  87. 'modal' => '查看详情',
  88. ),
  89. 'status' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '领取状态',
  93. 'default' => '1',
  94. 'desc' => '领取状态',
  95. 'match' => 'is_numeric',
  96. 'update' => 'select',
  97. 'search' => 'select',
  98. 'option' => $type,
  99. 'list' => true,
  100. //'edit' => true,
  101. ),
  102. 'state' => array
  103. (
  104. 'type' => 'tinyint-1',
  105. 'name' => '状态',
  106. 'default' => '1',
  107. 'desc' => '请选择状态',
  108. 'match' => 'is_numeric',
  109. ),
  110. 'cdate' => array
  111. (
  112. 'type' => 'int-11',
  113. 'name' => '更新时间',
  114. 'match' => array('is_numeric', time()),
  115. 'desc' => '',
  116. 'default' => '',
  117. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  118. ),
  119. ),
  120. 'top' => Dever::config('base', 'youzan')->top,
  121. 'manage' => array
  122. (
  123. 'delete' => false,
  124. 'insert' => false,
  125. 'edit' => false,
  126. # 开启批量管理
  127. //'mul' => true,
  128. ),
  129. 'request' => array
  130. (
  131. 'getAll' => array
  132. (
  133. # 匹配的正则或函数 选填项
  134. 'option' => array
  135. (
  136. 'status' => 'yes',
  137. 'cate_id' => 'yes',
  138. 'state' => 1,
  139. ),
  140. 'type' => 'all',
  141. 'limit' => '0,100',
  142. 'order' => array('id' => 'desc'),
  143. 'col' => '*',
  144. ),
  145. ),
  146. );