info.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'info',
  6. # 显示给用户看的名称
  7. 'lang' => '活动列表',
  8. # 后台菜单排序
  9. 'order' => 2,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. 'list' => true,
  22. 'order' => 'desc',
  23. ),
  24. 'name' => array
  25. (
  26. 'type' => 'varchar-200',
  27. 'name' => '活动名称',
  28. 'default' => '',
  29. 'desc' => '活动名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. ),
  35. 'num' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '限购数量-单位:张',
  39. 'default' => '',
  40. 'desc' => '限购数量',
  41. 'match' => 'is_string',
  42. // 'update' => 'text',
  43. 'search' => 'fulltext',
  44. // 'list' => true,
  45. ),
  46. 'price' => array
  47. (
  48. 'type' => 'decimal-11,2',
  49. 'name' => '票价-单位:元',
  50. 'default' => '0',
  51. 'desc' => '票价-单位:元',
  52. 'match' => 'option',
  53. 'update' => 'text',
  54. 'list' => true,
  55. ),
  56. 'banner' => array
  57. (
  58. 'type' => 'text-255',
  59. 'name' => '顶部banner',
  60. 'default' => '',
  61. 'desc' => '顶部banner',
  62. 'match' => 'is_string',
  63. 'update' => 'images',
  64. 'key' => '1',
  65. // 'place' => '759*562',
  66. ),
  67. 'pic' => array
  68. (
  69. 'type' => 'text-255',
  70. 'name' => '购买成功后的背景图',
  71. 'default' => '',
  72. 'desc' => '购买成功后的背景图',
  73. 'match' => 'option',
  74. 'update' => 'image',
  75. 'key' => '1',
  76. // 'place' => '759*562',
  77. ),
  78. 'mobile' => array
  79. (
  80. 'type' => 'bigint-11',
  81. 'name' => '客服电话',
  82. 'default' => '',
  83. 'desc' => '请输入客服电话',
  84. 'match' => 'option',
  85. 'update' => 'text',
  86. //'search' => 'fulltext',
  87. 'list' => true,
  88. ),
  89. 'desc' => array
  90. (
  91. 'type' => 'text-1000',
  92. 'name' => '活动说明',
  93. 'default' => '',
  94. 'desc' => '活动说明',
  95. 'match' => 'is_string',
  96. 'update' => 'editor',
  97. //'search' => 'fulltext',
  98. //'list' => true,
  99. ),
  100. 'reorder' => array
  101. (
  102. 'type' => 'int-11',
  103. 'name' => '排序-数值越大越靠前',
  104. 'default' => '1',
  105. 'desc' => '请输入排序',
  106. 'match' => 'option',
  107. 'update' => 'text',
  108. 'search' => 'order',
  109. 'list' => true,
  110. 'order' => 'desc',
  111. 'edit' => true,
  112. ),
  113. 'state' => array
  114. (
  115. 'type' => 'tinyint-1',
  116. 'name' => '状态',
  117. 'default' => '1',
  118. 'desc' => '请选择状态',
  119. 'match' => 'is_numeric',
  120. ),
  121. 'cdate' => array
  122. (
  123. 'type' => 'int-11',
  124. 'name' => '创建时间',
  125. 'match' => array('is_numeric', time()),
  126. 'desc' => '',
  127. # 只有insert时才生效
  128. 'insert' => true,
  129. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  130. ),
  131. ),
  132. 'alter' => array
  133. (
  134. 2 => array
  135. (
  136. array('update', 'desc', 'desc', 'text-1000 活动说明'),
  137. ),
  138. 3 => array
  139. (
  140. array('update', 'mobile', 'mobile', 'varchar-100 客服电话'),
  141. ),
  142. 'version' => 3,
  143. ),
  144. 'manage' => array
  145. (
  146. //'insert' => false,
  147. 'delete' => false,
  148. // 'edit' => false,
  149. ),
  150. 'request' => array
  151. (
  152. 'getAll' => array
  153. (
  154. # 匹配的正则或函数 选填项
  155. 'option' => array
  156. (
  157. // 'id' => array('yes','>'),
  158. 'state' => 1,
  159. ),
  160. 'type' => 'all',
  161. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  162. 'col' => '*',
  163. ),
  164. ),
  165. );