info.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. 'desc' => array
  79. (
  80. 'type' => 'varchar-500',
  81. 'name' => '活动说明',
  82. 'default' => '',
  83. 'desc' => '活动说明',
  84. 'match' => 'is_string',
  85. 'update' => 'editor',
  86. //'search' => 'fulltext',
  87. //'list' => true,
  88. ),
  89. 'reorder' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '排序-数值越大越靠前',
  93. 'default' => '1',
  94. 'desc' => '请输入排序',
  95. 'match' => 'option',
  96. 'update' => 'text',
  97. 'search' => 'order',
  98. 'list' => true,
  99. 'order' => 'desc',
  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. # 只有insert时才生效
  117. 'insert' => true,
  118. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  119. ),
  120. ),
  121. 'manage' => array
  122. (
  123. //'insert' => false,
  124. 'delete' => false,
  125. // 'edit' => false,
  126. ),
  127. 'request' => array
  128. (
  129. 'getAll' => array
  130. (
  131. # 匹配的正则或函数 选填项
  132. 'option' => array
  133. (
  134. // 'id' => array('yes','>'),
  135. 'state' => 1,
  136. ),
  137. 'type' => 'all',
  138. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  139. 'col' => '*',
  140. ),
  141. ),
  142. );