card_list.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. ),
  77. 'result' => array
  78. (
  79. 'type' => 'text-255',
  80. 'name' => '有赞返回信息',
  81. 'default' => '',
  82. 'desc' => '有赞返回信息',
  83. 'match' => 'option',
  84. 'update' => 'textarea',
  85. 'list' => true,
  86. 'modal' => '查看详情',
  87. ),
  88. 'status' => array
  89. (
  90. 'type' => 'tinyint-1',
  91. 'name' => '领取状态',
  92. 'default' => '1',
  93. 'desc' => '领取状态',
  94. 'match' => 'is_numeric',
  95. 'update' => 'select',
  96. 'search' => 'select',
  97. 'option' => $type,
  98. 'list' => true,
  99. //'edit' => true,
  100. ),
  101. 'state' => array
  102. (
  103. 'type' => 'tinyint-1',
  104. 'name' => '状态',
  105. 'default' => '1',
  106. 'desc' => '请选择状态',
  107. 'match' => 'is_numeric',
  108. ),
  109. 'cdate' => array
  110. (
  111. 'type' => 'int-11',
  112. 'name' => '更新时间',
  113. 'match' => array('is_numeric', time()),
  114. 'desc' => '',
  115. 'default' => '',
  116. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  117. ),
  118. ),
  119. 'top' => Dever::config('base', 'youzan')->top,
  120. 'manage' => array
  121. (
  122. 'delete' => false,
  123. 'insert' => false,
  124. 'edit' => false,
  125. ),
  126. 'request' => array
  127. (
  128. 'getAll' => array
  129. (
  130. # 匹配的正则或函数 选填项
  131. 'option' => array
  132. (
  133. 'status' => 'yes',
  134. 'cate_id' => 'yes',
  135. 'state' => 1,
  136. ),
  137. 'type' => 'all',
  138. 'order' => array('id' => 'desc'),
  139. 'col' => '*',
  140. ),
  141. ),
  142. );