buy_num.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?php
  2. # 定义几个常用的选项
  3. $status = array
  4. (
  5. 1 => '在线',
  6. 2 => '下线',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'buy_num',
  12. # 显示给用户看的名称
  13. 'lang' => '购买本数设置',
  14. 'order' => 100,
  15. 'menu' => false,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'search' => 'order',
  27. //'list' => true,
  28. ),
  29. 'info_id' => array
  30. (
  31. 'type' => 'int-11',
  32. 'name' => '小刊',
  33. 'default' => '',
  34. 'desc' => '小刊',
  35. 'match' => 'is_numeric',
  36. 'update' => 'hidden',
  37. 'value' => Dever::input('search_option_info_id')
  38. ),
  39. 'name' => array
  40. (
  41. 'type' => 'varchar-80',
  42. 'name' => '购买名称-一般为“购买n本”,如购买1本',
  43. 'default' => '',
  44. 'desc' => '购买名称',
  45. 'match' => 'is_string',
  46. 'update' => 'text',
  47. 'search' => 'fulltext',
  48. 'list' => true,
  49. ),
  50. 'price' => array
  51. (
  52. 'type' => 'varchar-50',
  53. 'name' => '购买时的标价',
  54. 'default' => '',
  55. 'desc' => '购买时的标价',
  56. 'match' => 'is_string',
  57. 'update' => 'text',
  58. ),
  59. 'cash' => array
  60. (
  61. 'type' => 'varchar-50',
  62. 'name' => '支付价格-实际支付价格,单位元,直接填写数字即可',
  63. 'default' => '',
  64. 'desc' => '支付价格',
  65. 'match' => 'is_string',
  66. 'update' => 'text',
  67. ),
  68. 'reorder' => array
  69. (
  70. 'type' => 'int-11',
  71. 'name' => '排序(数值越大越靠前)',
  72. 'default' => '1',
  73. 'desc' => '请输入排序',
  74. 'match' => 'option',
  75. 'update' => 'text',
  76. 'search' => 'order',
  77. 'list_name' => '排序',
  78. 'list' => true,
  79. 'order' => 'desc',
  80. 'edit' => true,
  81. ),
  82. 'state' => array
  83. (
  84. 'type' => 'tinyint-1',
  85. 'name' => '状态',
  86. 'default' => '1',
  87. 'desc' => '请选择状态',
  88. 'match' => 'is_numeric',
  89. ),
  90. 'cdate' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '添加时间',
  94. 'match' => array('is_numeric', time()),
  95. 'desc' => '',
  96. # 只有insert时才生效
  97. 'insert' => true,
  98. 'search' => 'date',
  99. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  100. ),
  101. ),
  102. 'manage' => array
  103. (
  104. ),
  105. 'request' => array
  106. (
  107. 'getAll' => array
  108. (
  109. # 匹配的正则或函数 选填项
  110. 'option' => array
  111. (
  112. 'info_id' => 'yes',
  113. 'state' => 1,
  114. ),
  115. 'type' => 'all',
  116. 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
  117. 'col' => '*',
  118. ),
  119. # 最低价格的
  120. 'getDataByMin' => array
  121. (
  122. # 匹配的正则或函数 选填项
  123. 'option' => array
  124. (
  125. 'info_id' => 'yes',
  126. 'state' => 1,
  127. ),
  128. 'type' => 'one',
  129. 'order' => array('cash' => 'asc','reorder' => 'desc', 'cdate' => 'desc'),
  130. 'col' => '*',
  131. ),
  132. ),
  133. );